diff options
| -rw-r--r-- | doc/specs/MASM_SPEC.md | 7 | ||||
| -rw-r--r-- | include/CompilerKit/AE.h | 22 | ||||
| -rw-r--r-- | src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cc | 2 | ||||
| -rw-r--r-- | src/CompilerKit/src/Compilers/README.md | 10 | ||||
| -rw-r--r-- | src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cc | 4 | ||||
| -rw-r--r-- | src/CompilerKit/src/Preprocessors/Preprocessor+Generic.cc (renamed from src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc) | 0 |
6 files changed, 34 insertions, 11 deletions
diff --git a/doc/specs/MASM_SPEC.md b/doc/specs/MASM_SPEC.md index 8b19b8e..b40183a 100644 --- a/doc/specs/MASM_SPEC.md +++ b/doc/specs/MASM_SPEC.md @@ -1 +1,8 @@ # Specification of NeKernel Assembler + +=================================== + +# 0: General Information + +=================================== + diff --git a/include/CompilerKit/AE.h b/include/CompilerKit/AE.h index 3f34fb8..945dd83 100644 --- a/include/CompilerKit/AE.h +++ b/include/CompilerKit/AE.h @@ -3,17 +3,17 @@ // file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) // Official repository: https://github.com/nekernel-org/nectar -#ifndef _NECTAR_AE_H_ -#define _NECTAR_AE_H_ +#ifndef NECTAR_COMPILERKIT_AE_H +#define NECTAR_COMPILERKIT_AE_H_ #include <CompilerKit/Detail/Config.h> #include <fstream> -#define kAEIdentVersion (0x0122) +#define kAEIdentVersion (0x0123) -#define kAEMag0 'A' +#define kAEMag0 'H' #define kAEMag1 'E' -#define kAEMag2 'F' +#define kAEMag2 'Y' #define kAESymbolLen (256) #define kAEPad (8) @@ -28,6 +28,7 @@ // You can also relocate at runtime but that's up to the operating system loader. namespace CompilerKit { + // @brief Advanced Executable Header // One thing to keep in mind. // This object format, is reloctable. @@ -64,15 +65,14 @@ enum { // provide operator<< for AE +namespace Operators { inline std::ofstream& operator<<(std::ofstream& fp, CompilerKit::AEHeader& container) { fp.write((char*) &container, sizeof(CompilerKit::AEHeader)); - return fp; } inline std::ofstream& operator<<(std::ofstream& fp, CompilerKit::AERecordHeader& container) { fp.write((char*) &container, sizeof(CompilerKit::AERecordHeader)); - return fp; } @@ -85,6 +85,11 @@ inline std::ifstream& operator>>(std::ifstream& fp, CompilerKit::AERecordHeader& fp.read((char*) &container, sizeof(CompilerKit::AERecordHeader)); return fp; } +} // namespace Operators + +#ifndef __CK_NO_USING_OPERATORS__ +using namespace Operators; +#endif namespace CompilerKit::Utils { /** @@ -128,6 +133,7 @@ class AEReadableProtocol final { return reinterpret_cast<TypeClass*>(raw); } }; + } // namespace CompilerKit::Utils -#endif /* ifndef _NECTAR_AE_H_ */ +#endif /* ifndef NECTAR_COMPILERKIT_AE_H */ diff --git a/src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cc b/src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cc index 9536864..c8bf13b 100644 --- a/src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cc +++ b/src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cc @@ -256,7 +256,7 @@ static bool kCurrentIfCondition{false}; /// detail namespaces const char* CompilerFrontendNectarAMD64::Language() { - return "Nectar"; + return "NeKernel Nectar"; } static std::uintptr_t kOrigin = kPefBaseOrigin; diff --git a/src/CompilerKit/src/Compilers/README.md b/src/CompilerKit/src/Compilers/README.md new file mode 100644 index 0000000..c3c17d4 --- /dev/null +++ b/src/CompilerKit/src/Compilers/README.md @@ -0,0 +1,10 @@ +# Nectar Frontends: + +The current status of Nectar's frontends. + +## Current Status: + +- Nectar (Implemented) +- C++ (Not implemented) +- C (Not implemented) + diff --git a/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cc b/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cc index b0a142e..02b6dcb 100644 --- a/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cc +++ b/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cc @@ -435,7 +435,7 @@ NECTAR_MODULE(DynamicLinker64PEF) { if (kVerbose) kConsoleOut << "Undefined entrypoint: " << kLinkerStart << ", you may have forget to link " - "against the C++ runtime library.\n"; + "against your runtime library.\n"; kConsoleOut << "Undefined entrypoint " << kLinkerStart << " for executable: " << kOutput << "\n"; @@ -587,7 +587,7 @@ NECTAR_MODULE(DynamicLinker64PEF) { if (kVerbose) { kConsoleOut << "Command name: " << name << "\n"; - kConsoleOut << "VirtualAddress of command content: " + kConsoleOut << "Virtual address of command content: " << command_headers[commandHeaderIndex].Offset << "\n"; } diff --git a/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc b/src/CompilerKit/src/Preprocessors/Preprocessor+Generic.cc index ab6a9fa..ab6a9fa 100644 --- a/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc +++ b/src/CompilerKit/src/Preprocessors/Preprocessor+Generic.cc |
