summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/PowerPC/Processor.hpp
blob: be929fd7d9d73f0c07389a54b5b1ed5693a7915a (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
/* -------------------------------------------

    Copyright Mahrouss Logic

------------------------------------------- */

#pragma once

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

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

namespace NewOS::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 NewOS::HAL

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