summaryrefslogtreecommitdiffhomepage
path: root/HALKit/PowerPC/Processor.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
commit5339d016c07bf717ee388f4feb73544087324af0 (patch)
tree94be6f67ed626091f24aee24ec3b3be03d01e4e7 /HALKit/PowerPC/Processor.hpp
git: port from mercurial repo.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'HALKit/PowerPC/Processor.hpp')
-rw-r--r--HALKit/PowerPC/Processor.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/HALKit/PowerPC/Processor.hpp b/HALKit/PowerPC/Processor.hpp
new file mode 100644
index 00000000..a1add51c
--- /dev/null
+++ b/HALKit/PowerPC/Processor.hpp
@@ -0,0 +1,50 @@
+/*
+ * ========================================================
+ *
+ * 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()
+ {
+
+ }
+}
+
+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); \ No newline at end of file