summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/PowerPC/Processor.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-26 22:26:48 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-26 22:27:09 +0100
commiteba8b7ddd0a455d9e49f32dcae712c5612c0093c (patch)
tree749a3d34546d055507a920bce4ab10e8a9945719 /Private/HALKit/PowerPC/Processor.hpp
parentdd192787a70a973f2474720aea49af3f6ddabb7a (diff)
Kernel: Major repository refactor.
Rework the repo into Private and Public modules. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit/PowerPC/Processor.hpp')
-rw-r--r--Private/HALKit/PowerPC/Processor.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/Private/HALKit/PowerPC/Processor.hpp b/Private/HALKit/PowerPC/Processor.hpp
new file mode 100644
index 00000000..58de1aa6
--- /dev/null
+++ b/Private/HALKit/PowerPC/Processor.hpp
@@ -0,0 +1,50 @@
+/*
+ * ========================================================
+ *
+ * hCore
+ * Copyright 2024 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