summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/PowerPC/Processor.hpp
blob: b1673f97b0a20883b1cb5737f9f7fefaf2ffc305 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 *	========================================================
 *
 *	HCore
 * 	Copyright Mahrouss Logic, all rights reserved.
 *
 * 	========================================================
 */

#pragma once

#include <NewKit/Defines.hpp>
#include <NewKit/Utils.hpp>

#define __aligned __attribute__((aligned(4)))

namespace HCore::HAL {
typedef UIntPtr Reg;

struct __aligned StackFrame {
  Reg R0;
  Reg R1;
  Reg R2;
  Reg R3;
  Reg R4;
  Reg R5;
  Reg R6;
  Reg R7;
  Reg ID;  // R8
};

typedef StackFrame* StackFramePtr;

inline void rt_halt() {
  while (1) {
  }
}

inline void rt_cli() {}
}  // namespace HCore::HAL

extern "C" void int_handle_math(HCore::UIntPtr sp);
extern "C" void int_handle_pf(HCore::UIntPtr sp);
extern "C" void* __ppc_alloca(size_t sz);