diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-18 10:27:31 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-18 10:27:31 +0200 |
| commit | fbbcfd27436fe61799c79aec14f9c2c3fdf73497 (patch) | |
| tree | d8be437f572605462637007f6bd371b6b4a650cb /dev/LibCompiler/src | |
| parent | 2a1e217019f66b1913034b6bd760052f3b37cea4 (diff) | |
feat: PEF format update `5.0` and codebase refactors.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src')
| -rw-r--r-- | dev/LibCompiler/src/Backend/AssemblerAMD64.cc | 2 | ||||
| -rw-r--r-- | dev/LibCompiler/src/BasicString.cc | 2 | ||||
| -rw-r--r-- | dev/LibCompiler/src/CodeGen.cc | 2 | ||||
| -rw-r--r-- | dev/LibCompiler/src/Frontend.cc | 10 | ||||
| -rw-r--r-- | dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc | 2 | ||||
| -rw-r--r-- | dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc | 3 | ||||
| -rw-r--r-- | dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc | 2 |
7 files changed, 12 insertions, 11 deletions
diff --git a/dev/LibCompiler/src/Backend/AssemblerAMD64.cc b/dev/LibCompiler/src/Backend/AssemblerAMD64.cc index 3a717ba..4d03fd7 100644 --- a/dev/LibCompiler/src/Backend/AssemblerAMD64.cc +++ b/dev/LibCompiler/src/Backend/AssemblerAMD64.cc @@ -957,7 +957,7 @@ bool LibCompiler::EncoderAMD64::WriteLine(std::string line, std::string file) { struct RegMapAMD64 { LibCompiler::STLString fName; - i64_byte_t fModRM; + i64_byte_t fModRM; }; std::vector<RegMapAMD64> kRegisterList{ diff --git a/dev/LibCompiler/src/BasicString.cc b/dev/LibCompiler/src/BasicString.cc index 41989fe..c4cb763 100644 --- a/dev/LibCompiler/src/BasicString.cc +++ b/dev/LibCompiler/src/BasicString.cc @@ -8,7 +8,7 @@ */ /** - * @file BasicString.cxx + * @file BasicString.cc * @author Amlal (amlal@el-mahrouss-logic.com) * @brief C++ string manipulation API. * @version 0.2 diff --git a/dev/LibCompiler/src/CodeGen.cc b/dev/LibCompiler/src/CodeGen.cc index 3f215c5..7208d65 100644 --- a/dev/LibCompiler/src/CodeGen.cc +++ b/dev/LibCompiler/src/CodeGen.cc @@ -8,7 +8,7 @@ #include <LibCompiler/ErrorID.h> /** - * @file AssemblyFactory.cxx + * @file CodeGen.cc * @author amlal (amlal@nekernel.org) * @brief Assembler Kit * @version 0.1 diff --git a/dev/LibCompiler/src/Frontend.cc b/dev/LibCompiler/src/Frontend.cc index 69ff6fd..2ed5309 100644 --- a/dev/LibCompiler/src/Frontend.cc +++ b/dev/LibCompiler/src/Frontend.cc @@ -11,11 +11,11 @@ namespace LibCompiler { /// \param haystack base string /// \param needle the string we search for. /// \return if we found it or not. -bool find_word(std::string haystack, std::string needle) noexcept { +BOOL find_word(STLString haystack, STLString needle) noexcept { auto index = haystack.find(needle); // check for needle validity. - if (index == std::string::npos) return false; + if (index == STLString::npos) return false; // declare lambda auto not_part_of_word = [&](int index) { @@ -33,11 +33,11 @@ bool find_word(std::string haystack, std::string needle) noexcept { /// \param haystack /// \param needle /// \return position of needle. -std::size_t find_word_range(std::string haystack, std::string needle) noexcept { +SizeType find_word_range(STLString haystack, STLString needle) noexcept { auto index = haystack.find(needle); // check for needle validity. - if (index == std::string::npos) return false; + if (index == STLString::npos) return false; if (!isalnum((haystack[index + needle.size() + 1])) && !isdigit(haystack[index + needle.size() + 1]) && @@ -46,6 +46,6 @@ std::size_t find_word_range(std::string haystack, std::string needle) noexcept { return index; } - return std::string::npos; + return STLString::npos; } } // namespace LibCompiler
\ No newline at end of file diff --git a/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc b/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc index 4a1a1f7..984d059 100644 --- a/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc +++ b/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc @@ -1,7 +1,7 @@ /* * ======================================================== * - * cxxdrv + * CompilerCPlusPlusAMD64 CPlusPlus Compiler Driver * Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved. * * ======================================================== diff --git a/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc b/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc index b58c786..a383351 100644 --- a/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc +++ b/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc @@ -69,7 +69,7 @@ namespace Detail { struct DynamicLinkerBlob final { std::vector<Char> mBlob{}; // PEF code/bss/data blob. - UIntPtr mOffset{0UL}; // the offset of the PEF container header... + UIntPtr mOffset{0UL}; // the offset of the PEF container header... }; } // namespace Detail @@ -367,6 +367,7 @@ LIBCOMPILER_MODULE(DynamicLinker64PEF) { } kConsoleOut << "Not an AE container: " << objectFile << std::endl; + // don't continue, it is a fatal error. return LIBCOMPILER_EXEC_ERROR; } diff --git a/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc b/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc index 2c7c551..f9986f4 100644 --- a/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc +++ b/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc @@ -1,7 +1,7 @@ /* * ======================================================== * - * bpp + * CPlusPlusCompilerPreProcessor Preprocessor Driver * Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved. * * ======================================================== |
