From 5fbec948d16f63c5847e8e27b4fafc9c081c76fd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 8 Mar 2026 14:44:12 +0100 Subject: [CHORE] Add conanfile.txt, update AUTHORS. Signed-off-by: Amlal El Mahrouss --- AUTHORS | 1 + MailMap | 3 +++ conanfile.txt | 7 +++++++ src/CompilerKit/src/Assemblers/Assembler+AMD64.cpp | 14 ++++++++------ 4 files changed, 19 insertions(+), 6 deletions(-) create mode 120000 AUTHORS create mode 100644 conanfile.txt diff --git a/AUTHORS b/AUTHORS new file mode 120000 index 0000000..e781202 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +MailMap \ No newline at end of file diff --git a/MailMap b/MailMap index 6f36f25..7848644 100644 --- a/MailMap +++ b/MailMap @@ -1 +1,4 @@ @amlel-el-mahrouss - amlal@nekernel.org +@2Los +@0xf00sec + diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 0000000..e0de5ca --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,7 @@ +[requires] +boost/1.90.0 +[generators] +CMakeDeps +CMakeToolchain +[layout] +cmake_layout diff --git a/src/CompilerKit/src/Assemblers/Assembler+AMD64.cpp b/src/CompilerKit/src/Assemblers/Assembler+AMD64.cpp index 3fbeb37..6ee1313 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+AMD64.cpp +++ b/src/CompilerKit/src/Assemblers/Assembler+AMD64.cpp @@ -325,7 +325,7 @@ asm_fail_exit: ///////////////////////////////////////////////////////////////////////////////////////// -static bool asm_read_attributes(std::string line) { +static bool asm_read_attributes(CompilerKit::STLString line) { // extern_segment is the opposite of public_segment, it signals to the ld // that we need this symbol. if (CompilerKit::ast_find_needle(line, "extern_segment")) { @@ -624,8 +624,8 @@ bool CompilerKit::EncoderAMD64::WriteNumber(const std::size_t& pos, std::string& CompilerKit::NumberCast64 num = CompilerKit::NumberCast64(res); - for (char& i : num.number) { - kAppBytes.push_back(i); + for (auto& nidx : num.number) { + kAppBytes.push_back(nidx); } if (kVerbose) { @@ -952,9 +952,9 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK std::string memOperand = substr.substr(bracketStart + 1, bracketEnd - bracketStart - 1); // Register lookup table - struct RegInfo { - const char* name; - i64_byte_t code; + struct RegInfo final { + const char* name{}; + i64_byte_t code{}; }; RegInfo regs64[] = {{"rax", 0}, {"rcx", 1}, {"rdx", 2}, {"rbx", 3}, @@ -1003,6 +1003,7 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK // Find register in the other operand std::string otherOperand; + if (destIsMemory) { otherOperand = substr.substr(commaPos + 1); } else { @@ -1031,6 +1032,7 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK if (!foundReg) { // Check if it's an immediate value std::string immStr = otherOperand; + while (!immStr.empty() && (immStr[0] == ' ' || immStr[0] == '\t')) { immStr.erase(0, 1); } -- cgit v1.2.3