summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AMD64/HalProcessPrimitives.cxx
blob: d24afad67937465833602a1631d51bc132bd7ea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 *	========================================================
 *
 *	HCore
 * 	Copyright Mahrouss Logic, all rights reserved.
 *
 * 	========================================================
 */

#include <KernelKit/ProcessManager.hpp>

#include "NewKit/Defines.hpp"

using namespace HCore;

Void Process::AssignStart(UIntPtr &imageStart) noexcept {
  if (imageStart == 0) this->Crash();

#ifdef __x86_64__
  this->StackFrame->Rbp = imageStart;
#elif defined(__powerpc)
  // link return register towards the __start symbol.
  this->StackFrame->R3 = imageStart;
#endif
}