summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/Backend/AssemblerAMD64.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-28 14:33:48 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-28 14:33:48 +0200
commit46badbe70a36bb3cb5d86bd9f33aa5481c9709b9 (patch)
tree33f3759845a25c51cea5d92177a3f7ebd269f984 /dev/LibCompiler/src/Backend/AssemblerAMD64.cc
parent0965112fb81ef3e04010197f68f743c98a7611ba (diff)
feat!: update the kernel codegen to output bit width and origin.
refactor!: refactor codebase, breaking changes. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/Backend/AssemblerAMD64.cc')
-rw-r--r--dev/LibCompiler/src/Backend/AssemblerAMD64.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/dev/LibCompiler/src/Backend/AssemblerAMD64.cc b/dev/LibCompiler/src/Backend/AssemblerAMD64.cc
index e9f3ad5..6551743 100644
--- a/dev/LibCompiler/src/Backend/AssemblerAMD64.cc
+++ b/dev/LibCompiler/src/Backend/AssemblerAMD64.cc
@@ -21,7 +21,9 @@
/////////////////////////////////////////////////////////////////////////////////////////
+#ifndef __ASM_NEED_AMD64__
#define __ASM_NEED_AMD64__ 1
+#endif
#define kAssemblerPragmaSymStr "#"
#define kAssemblerPragmaSym '#'
@@ -74,7 +76,7 @@ static const std::string kUndefinedSymbol = ":UndefinedSymbol:";
// \brief forward decl.
static bool asm_read_attributes(std::string line);
-#include <LibCompiler/Util/LCAsmUtils.h>
+#include <LibCompiler/Util/AsmUtils.h>
/////////////////////////////////////////////////////////////////////////////////////////
@@ -85,7 +87,7 @@ static bool asm_read_attributes(std::string line);
LIBCOMPILER_MODULE(AssemblerMainAMD64) {
//////////////// CPU OPCODES BEGIN ////////////////
- ::signal(SIGSEGV, Detail::drvi_crash_handler);
+ LibCompiler::install_signal(SIGSEGV, Detail::drvi_crash_handler);
std::string opcodes_jump[kJumpLimit] = {"ja", "jae", "jb", "jbe", "jc", "je", "jg", "jge",
"jl", "jle", "jna", "jnae", "jnb", "jnbe", "jnc", "jne",