summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-20 21:43:27 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-20 21:43:27 +0200
commit9a2556dbc309c6ffe4e945dcd8685ab6092cc903 (patch)
treed95d2412580155d664edaaab6fb3bfce7e15706a /dev
parentca64c5bf12b583e4a170ab34fd5002b8c069106e (diff)
+ big refactors, now using the 'NDK' name.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev')
-rw-r--r--dev/crtdll/__ndk_alloca.hxx (renamed from dev/crtdll/__mpcc_alloca.hxx)2
-rw-r--r--dev/crtdll/__ndk_defines.hxx (renamed from dev/crtdll/__mpcc_defines.hxx)16
-rw-r--r--dev/crtdll/__ndk_exception.hxx (renamed from dev/crtdll/__mpcc_exception.hxx)0
-rw-r--r--dev/crtdll/__ndk_hint.hxx (renamed from dev/crtdll/__mpcc_hint.hxx)0
-rw-r--r--dev/crtdll/__ndk_malloc.hxx (renamed from dev/crtdll/__mpcc_malloc.hxx)0
-rw-r--r--dev/crtdll/__ndk_power.inc (renamed from dev/crtdll/__mpcc_power.inc)2
-rw-r--r--dev/ndkdll/Asm/Asm.hxx (renamed from dev/ndkdll/AsmKit/AsmKit.hxx)14
-rw-r--r--dev/ndkdll/Asm/CPU/32x0.hxx (renamed from dev/ndkdll/AsmKit/CPU/32x0.hxx)0
-rw-r--r--dev/ndkdll/Asm/CPU/64x0.hxx (renamed from dev/ndkdll/AsmKit/CPU/64x0.hxx)0
-rw-r--r--dev/ndkdll/Asm/CPU/amd64.hxx (renamed from dev/ndkdll/AsmKit/CPU/amd64.hxx)0
-rw-r--r--dev/ndkdll/Asm/CPU/arm64.hxx (renamed from dev/ndkdll/AsmKit/CPU/arm64.hxx)0
-rw-r--r--dev/ndkdll/Asm/CPU/ppc.hxx (renamed from dev/ndkdll/AsmKit/CPU/ppc.hxx)0
-rw-r--r--dev/ndkdll/Defines.hxx14
-rw-r--r--dev/ndkdll/Macros.hxx14
-rw-r--r--dev/ndkdll/NFC/AE.hxx2
-rw-r--r--dev/ndkdll/NFC/ErrorID.hxx16
-rw-r--r--dev/ndkdll/NFC/String.hxx2
-rw-r--r--dev/ndkdll/Parser.hxx4
-rw-r--r--dev/ndkdll/Private/Imaging/TPM.hxx17
-rw-r--r--dev/ndkdll/Sources/Assembler32x0.cxx2
-rw-r--r--dev/ndkdll/Sources/Assembler64x0.cxx2
-rw-r--r--dev/ndkdll/Sources/AssemblerAMD64.cxx2
-rw-r--r--dev/ndkdll/Sources/AssemblerPower.cxx4
-rw-r--r--dev/ndkdll/Sources/AssemblyFactory.cxx6
-rw-r--r--dev/ndkdll/Sources/BasicPreProcessor.cxx4
-rw-r--r--dev/ndkdll/Sources/CCompiler64x0.cxx8
-rw-r--r--dev/ndkdll/Sources/CCompilerPower64.cxx10
-rw-r--r--dev/ndkdll/Sources/CPlusPlusCompilerAMD64.cxx16
-rw-r--r--dev/ndkdll/Sources/Detail/asmutils.hxx2
-rw-r--r--dev/ndkdll/Sources/Detail/compilerutils.hxx2
-rw-r--r--dev/ndkdll/Sources/Linker.cxx22
31 files changed, 83 insertions, 100 deletions
diff --git a/dev/crtdll/__mpcc_alloca.hxx b/dev/crtdll/__ndk_alloca.hxx
index 9871c60..48732a0 100644
--- a/dev/crtdll/__mpcc_alloca.hxx
+++ b/dev/crtdll/__ndk_alloca.hxx
@@ -9,7 +9,7 @@
typedef void* ptr_type;
typedef __SIZE_TYPE__ size_type;
-inline ptr_type __mpcc_alloca_gcc(size_type sz)
+inline ptr_type __ndk_alloca_gcc(size_type sz)
{
return __builtin_alloca(sz);
}
diff --git a/dev/crtdll/__mpcc_defines.hxx b/dev/crtdll/__ndk_defines.hxx
index 19ed8a4..4af1fba 100644
--- a/dev/crtdll/__mpcc_defines.hxx
+++ b/dev/crtdll/__ndk_defines.hxx
@@ -4,8 +4,8 @@
------------------------------------------- */
-#ifndef __MPCC_DEF__
-#define __MPCC_DEF__
+#ifndef __NDK_DEF__
+#define __NDK_DEF__
#ifndef __GNUC__
@@ -28,12 +28,12 @@ typedef char* caddr_t;
#endif // !null
#ifdef __GNUC__
-#include <CRT/__mpcc_alloca.hxx>
-#define __mpcc_alloca(sz) __mpcc_alloca_gcc(sz)
+#include <CRT/__ndk_alloca.hxx>
+#define __ndk_alloca(sz) __ndk_alloca_gcc(sz)
#define __packed__ __attribute__((packed))
-#elif defined(__MPCC__)
-#define __packed__ __mpcc_packed__
-#define __alloca(sz) __mpcc_alloca(sz)
+#elif defined(__NDK__)
+#define __packed__ __ndk_packed__
+#define __alloca(sz) __ndk_alloca(sz)
#endif
#define __deref(ptr) (*(ptr))
@@ -80,4 +80,4 @@ typedef union double_cast {
#endif // ifndef __GNUC__
-#endif /* __MPCC_DEF__ */
+#endif /* __NDK_DEF__ */
diff --git a/dev/crtdll/__mpcc_exception.hxx b/dev/crtdll/__ndk_exception.hxx
index dac42ad..dac42ad 100644
--- a/dev/crtdll/__mpcc_exception.hxx
+++ b/dev/crtdll/__ndk_exception.hxx
diff --git a/dev/crtdll/__mpcc_hint.hxx b/dev/crtdll/__ndk_hint.hxx
index 02dbc94..02dbc94 100644
--- a/dev/crtdll/__mpcc_hint.hxx
+++ b/dev/crtdll/__ndk_hint.hxx
diff --git a/dev/crtdll/__mpcc_malloc.hxx b/dev/crtdll/__ndk_malloc.hxx
index eeaa67b..eeaa67b 100644
--- a/dev/crtdll/__mpcc_malloc.hxx
+++ b/dev/crtdll/__ndk_malloc.hxx
diff --git a/dev/crtdll/__mpcc_power.inc b/dev/crtdll/__ndk_power.inc
index 90b1364..cada02e 100644
--- a/dev/crtdll/__mpcc_power.inc
+++ b/dev/crtdll/__ndk_power.inc
@@ -1,4 +1,4 @@
-# Path: SDK/__mpcc_power.inc
+# Path: SDK/__ndk_power.inc
# Language: NDK POWER Assembly support for GNU.
# Build Date: 2024-6-4
diff --git a/dev/ndkdll/AsmKit/AsmKit.hxx b/dev/ndkdll/Asm/Asm.hxx
index 4c2cd78..fb90143 100644
--- a/dev/ndkdll/AsmKit/AsmKit.hxx
+++ b/dev/ndkdll/Asm/Asm.hxx
@@ -21,7 +21,7 @@ namespace NDK
explicit AssemblyInterface() = default;
virtual ~AssemblyInterface() = default;
- MPCC_COPY_DEFAULT(AssemblyInterface);
+ NDK_COPY_DEFAULT(AssemblyInterface);
//@ brief compile to object file.
// Example C++ -> MASM -> AE object.
@@ -35,7 +35,7 @@ namespace NDK
explicit AssemblyFactory() = default;
~AssemblyFactory() = default;
- MPCC_COPY_DEFAULT(AssemblyFactory);
+ NDK_COPY_DEFAULT(AssemblyFactory);
public:
enum
@@ -128,7 +128,7 @@ namespace NDK
explicit EncoderInterface() = default;
virtual ~EncoderInterface() = default;
- MPCC_COPY_DEFAULT(EncoderInterface);
+ NDK_COPY_DEFAULT(EncoderInterface);
virtual std::string CheckLine(std::string& line, const std::string& file) = 0;
virtual bool WriteLine(std::string& line, const std::string& file) = 0;
@@ -143,7 +143,7 @@ namespace NDK
explicit EncoderAMD64() = default;
~EncoderAMD64() override = default;
- MPCC_COPY_DEFAULT(EncoderAMD64);
+ NDK_COPY_DEFAULT(EncoderAMD64);
virtual std::string CheckLine(std::string& line,
const std::string& file) override;
@@ -166,7 +166,7 @@ namespace NDK
explicit Encoder64x0() = default;
~Encoder64x0() override = default;
- MPCC_COPY_DEFAULT(Encoder64x0);
+ NDK_COPY_DEFAULT(Encoder64x0);
virtual std::string CheckLine(std::string& line,
const std::string& file) override;
@@ -185,7 +185,7 @@ namespace NDK
explicit Encoder32x0() = default;
~Encoder32x0() override = default;
- MPCC_COPY_DEFAULT(Encoder32x0);
+ NDK_COPY_DEFAULT(Encoder32x0);
virtual std::string CheckLine(std::string& line,
const std::string& file) override;
@@ -204,7 +204,7 @@ namespace NDK
explicit EncoderPowerPC() = default;
~EncoderPowerPC() override = default;
- MPCC_COPY_DEFAULT(EncoderPowerPC);
+ NDK_COPY_DEFAULT(EncoderPowerPC);
virtual std::string CheckLine(std::string& line,
const std::string& file) override;
diff --git a/dev/ndkdll/AsmKit/CPU/32x0.hxx b/dev/ndkdll/Asm/CPU/32x0.hxx
index 018dea9..018dea9 100644
--- a/dev/ndkdll/AsmKit/CPU/32x0.hxx
+++ b/dev/ndkdll/Asm/CPU/32x0.hxx
diff --git a/dev/ndkdll/AsmKit/CPU/64x0.hxx b/dev/ndkdll/Asm/CPU/64x0.hxx
index 99a88b1..99a88b1 100644
--- a/dev/ndkdll/AsmKit/CPU/64x0.hxx
+++ b/dev/ndkdll/Asm/CPU/64x0.hxx
diff --git a/dev/ndkdll/AsmKit/CPU/amd64.hxx b/dev/ndkdll/Asm/CPU/amd64.hxx
index 4067ec7..4067ec7 100644
--- a/dev/ndkdll/AsmKit/CPU/amd64.hxx
+++ b/dev/ndkdll/Asm/CPU/amd64.hxx
diff --git a/dev/ndkdll/AsmKit/CPU/arm64.hxx b/dev/ndkdll/Asm/CPU/arm64.hxx
index 85e2f75..85e2f75 100644
--- a/dev/ndkdll/AsmKit/CPU/arm64.hxx
+++ b/dev/ndkdll/Asm/CPU/arm64.hxx
diff --git a/dev/ndkdll/AsmKit/CPU/ppc.hxx b/dev/ndkdll/Asm/CPU/ppc.hxx
index e3ea6c5..e3ea6c5 100644
--- a/dev/ndkdll/AsmKit/CPU/ppc.hxx
+++ b/dev/ndkdll/Asm/CPU/ppc.hxx
diff --git a/dev/ndkdll/Defines.hxx b/dev/ndkdll/Defines.hxx
index 10f61c7..b762297 100644
--- a/dev/ndkdll/Defines.hxx
+++ b/dev/ndkdll/Defines.hxx
@@ -4,8 +4,8 @@
------------------------------------------- */
-#ifndef __MPCC_DEFINES_HPP__
-#define __MPCC_DEFINES_HPP__
+#ifndef __NDK_DEFINES_HPP__
+#define __NDK_DEFINES_HPP__
#ifndef Yes
#define Yes true
@@ -61,19 +61,19 @@
#define rt_copy_memory(dst, src, len) memcpy(dst, src, len)
#endif
-#define MPCC_COPY_DELETE(KLASS) \
+#define NDK_COPY_DELETE(KLASS) \
KLASS& operator=(const KLASS&) = delete; \
KLASS(const KLASS&) = delete;
-#define MPCC_COPY_DEFAULT(KLASS) \
+#define NDK_COPY_DEFAULT(KLASS) \
KLASS& operator=(const KLASS&) = default; \
KLASS(const KLASS&) = default;
-#define MPCC_MOVE_DELETE(KLASS) \
+#define NDK_MOVE_DELETE(KLASS) \
KLASS& operator=(KLASS&&) = delete; \
KLASS(KLASS&&) = delete;
-#define MPCC_MOVE_DEFAULT(KLASS) \
+#define NDK_MOVE_DEFAULT(KLASS) \
KLASS& operator=(KLASS&&) = default; \
KLASS(KLASS&&) = default;
@@ -140,4 +140,4 @@ typedef char char_type;
#pragma scalar_storage_order big-endian
-#endif /* ifndef __MPCC_DEFINES_HPP__ */
+#endif /* ifndef __NDK_DEFINES_HPP__ */
diff --git a/dev/ndkdll/Macros.hxx b/dev/ndkdll/Macros.hxx
index c190cda..5bdd43e 100644
--- a/dev/ndkdll/Macros.hxx
+++ b/dev/ndkdll/Macros.hxx
@@ -9,25 +9,25 @@
#ifndef _CK_CL_HPP
#define _CK_CL_HPP
-#define MPCC_COPY_DELETE(KLASS) \
+#define NDK_COPY_DELETE(KLASS) \
KLASS& operator=(const KLASS&) = delete; \
KLASS(const KLASS&) = delete;
-#define MPCC_COPY_DEFAULT(KLASS) \
+#define NDK_COPY_DEFAULT(KLASS) \
KLASS& operator=(const KLASS&) = default; \
KLASS(const KLASS&) = default;
-#define MPCC_MOVE_DELETE(KLASS) \
+#define NDK_MOVE_DELETE(KLASS) \
KLASS& operator=(KLASS&&) = delete; \
KLASS(KLASS&&) = delete;
-#define MPCC_MOVE_DEFAULT(KLASS) \
+#define NDK_MOVE_DEFAULT(KLASS) \
KLASS& operator=(KLASS&&) = default; \
KLASS(KLASS&&) = default;
/// @note xxxx is the error placeholder, in hexadecimal.
-#define MPCC_ERROR_PREFIX_CXX "CXXxxxx"
-#define MPCC_ERROR_PREFIX_CL "CLxxxx"
-#define MPCC_ERROR_PREFIX_ASM "ASMxxxx"
+#define NDK_ERROR_PREFIX_CXX "CXXxxxx"
+#define NDK_ERROR_PREFIX_CL "CLxxxx"
+#define NDK_ERROR_PREFIX_ASM "ASMxxxx"
#endif /* ifndef _CK_CL_HPP */
diff --git a/dev/ndkdll/NFC/AE.hxx b/dev/ndkdll/NFC/AE.hxx
index 11b4600..544f199 100644
--- a/dev/ndkdll/NFC/AE.hxx
+++ b/dev/ndkdll/NFC/AE.hxx
@@ -107,7 +107,7 @@ namespace NDK::Utils
explicit AEReadableProtocol() = default;
~AEReadableProtocol() = default;
- MPCC_COPY_DELETE(AEReadableProtocol);
+ NDK_COPY_DELETE(AEReadableProtocol);
/**
* @brief Read AE record
diff --git a/dev/ndkdll/NFC/ErrorID.hxx b/dev/ndkdll/NFC/ErrorID.hxx
index 631b67f..c3d5729 100644
--- a/dev/ndkdll/NFC/ErrorID.hxx
+++ b/dev/ndkdll/NFC/ErrorID.hxx
@@ -12,11 +12,11 @@
#include <ndkdll/Defines.hxx>
#include <ndkdll/NFC/ErrorOr.hxx>
-#define MPCC_EXEC_ERROR -30
-#define MPCC_FILE_NOT_FOUND -31
-#define MPCC_DIR_NOT_FOUND -32
-#define MPCC_FILE_EXISTS -33
-#define MPCC_TOO_LONG -34
-#define MPCC_INVALID_DATA -35
-#define MPCC_UNIMPLEMENTED -36
-#define MPCC_FAT_ERROR -37
+#define NDK_EXEC_ERROR -30
+#define NDK_FILE_NOT_FOUND -31
+#define NDK_DIR_NOT_FOUND -32
+#define NDK_FILE_EXISTS -33
+#define NDK_TOO_LONG -34
+#define NDK_INVALID_DATA -35
+#define NDK_UNIMPLEMENTED -36
+#define NDK_FAT_ERROR -37
diff --git a/dev/ndkdll/NFC/String.hxx b/dev/ndkdll/NFC/String.hxx
index 3a9b6ff..c42c412 100644
--- a/dev/ndkdll/NFC/String.hxx
+++ b/dev/ndkdll/NFC/String.hxx
@@ -42,7 +42,7 @@ namespace NDK
}
}
- MPCC_COPY_DEFAULT(StringView);
+ NDK_COPY_DEFAULT(StringView);
CharType* Data();
const CharType* CData() const;
diff --git a/dev/ndkdll/Parser.hxx b/dev/ndkdll/Parser.hxx
index 8abeae7..20a2995 100644
--- a/dev/ndkdll/Parser.hxx
+++ b/dev/ndkdll/Parser.hxx
@@ -6,7 +6,7 @@
#pragma once
-#include <ndkdll/AsmKit/AsmKit.hxx>
+#include <ndkdll/Asm/Asm.hxx>
#include <vector>
namespace NDK
@@ -21,7 +21,7 @@ namespace NDK
explicit CompilerBackend() = default;
virtual ~CompilerBackend() = default;
- MPCC_COPY_DEFAULT(CompilerBackend);
+ NDK_COPY_DEFAULT(CompilerBackend);
// NOTE: cast this to your user defined ast.
typedef void* AstType;
diff --git a/dev/ndkdll/Private/Imaging/TPM.hxx b/dev/ndkdll/Private/Imaging/TPM.hxx
deleted file mode 100644
index dbd90fe..0000000
--- a/dev/ndkdll/Private/Imaging/TPM.hxx
+++ /dev/null
@@ -1,17 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies
-
-------------------------------------------- */
-
-/**
- @brief The Explicit Partition Map scheme.
-*/
-
-#ifndef __IMAGING_TPM_HXX__
-#define __IMAGING_TPM_HXX__
-
-struct TPM_IMAGE_HEADER;
-struct TPM_FILE_RECORD;
-
-#endif // ifndef __IMAGING_TPM_HXX__
diff --git a/dev/ndkdll/Sources/Assembler32x0.cxx b/dev/ndkdll/Sources/Assembler32x0.cxx
index 213e335..42e1bb4 100644
--- a/dev/ndkdll/Sources/Assembler32x0.cxx
+++ b/dev/ndkdll/Sources/Assembler32x0.cxx
@@ -19,7 +19,7 @@
#define __ASM_NEED_32x0__ 1
-#include <ndkdll/AsmKit/CPU/32x0.hxx>
+#include <ndkdll/Asm/CPU/32x0.hxx>
#include <ndkdll/Parser.hxx>
#include <ndkdll/NFC/AE.hxx>
#include <ndkdll/NFC/PEF.hxx>
diff --git a/dev/ndkdll/Sources/Assembler64x0.cxx b/dev/ndkdll/Sources/Assembler64x0.cxx
index 552b547..a02ed03 100644
--- a/dev/ndkdll/Sources/Assembler64x0.cxx
+++ b/dev/ndkdll/Sources/Assembler64x0.cxx
@@ -19,7 +19,7 @@
#define __ASM_NEED_64x0__ 1
-#include <ndkdll/AsmKit/CPU/64x0.hxx>
+#include <ndkdll/Asm/CPU/64x0.hxx>
#include <ndkdll/Parser.hxx>
#include <ndkdll/NFC/AE.hxx>
#include <ndkdll/NFC/PEF.hxx>
diff --git a/dev/ndkdll/Sources/AssemblerAMD64.cxx b/dev/ndkdll/Sources/AssemblerAMD64.cxx
index 24686b4..73782de 100644
--- a/dev/ndkdll/Sources/AssemblerAMD64.cxx
+++ b/dev/ndkdll/Sources/AssemblerAMD64.cxx
@@ -27,7 +27,7 @@
#define kAssemblerPragmaSymStr "#"
#define kAssemblerPragmaSym '#'
-#include <ndkdll/AsmKit/CPU/amd64.hxx>
+#include <ndkdll/Asm/CPU/amd64.hxx>
#include <ndkdll/Parser.hxx>
#include <ndkdll/NFC/AE.hxx>
#include <ndkdll/NFC/PEF.hxx>
diff --git a/dev/ndkdll/Sources/AssemblerPower.cxx b/dev/ndkdll/Sources/AssemblerPower.cxx
index 1d4f3d3..231829f 100644
--- a/dev/ndkdll/Sources/AssemblerPower.cxx
+++ b/dev/ndkdll/Sources/AssemblerPower.cxx
@@ -18,7 +18,7 @@
#define __ASM_NEED_PPC__ 1
#include <ndkdll/NFC/ErrorID.hxx>
-#include <ndkdll/AsmKit/CPU/ppc.hxx>
+#include <ndkdll/Asm/CPU/ppc.hxx>
#include <ndkdll/NFC/PEF.hxx>
#include <ndkdll/Parser.hxx>
#include <ndkdll/NFC/AE.hxx>
@@ -299,7 +299,7 @@ asm_fail_exit:
if (kVerbose)
kStdOut << "power-as: Exit failed.\n";
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/dev/ndkdll/Sources/AssemblyFactory.cxx b/dev/ndkdll/Sources/AssemblyFactory.cxx
index 506652c..51c5d56 100644
--- a/dev/ndkdll/Sources/AssemblyFactory.cxx
+++ b/dev/ndkdll/Sources/AssemblyFactory.cxx
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <ndkdll/AsmKit/AsmKit.hxx>
+#include <ndkdll/Asm/Asm.hxx>
#include <ndkdll/NFC/ErrorID.hxx>
/**
@@ -20,7 +20,7 @@
#include <iostream>
-//! @file AsmKit.cpp
+//! @file Asm.cpp
//! @brief AssemblyKit source implementation.
namespace NDK
@@ -30,7 +30,7 @@ namespace NDK
const Int32& arch) noexcept
{
if (sourceFile.length() < 1 || !fMounted)
- return MPCC_UNIMPLEMENTED;
+ return NDK_UNIMPLEMENTED;
return fMounted->CompileToFormat(sourceFile, arch);
}
diff --git a/dev/ndkdll/Sources/BasicPreProcessor.cxx b/dev/ndkdll/Sources/BasicPreProcessor.cxx
index 3056f13..c843824 100644
--- a/dev/ndkdll/Sources/BasicPreProcessor.cxx
+++ b/dev/ndkdll/Sources/BasicPreProcessor.cxx
@@ -58,7 +58,7 @@ class bpp_pragma final {
explicit bpp_pragma() = default;
~bpp_pragma() = default;
- MPCC_COPY_DEFAULT(bpp_pragma);
+ NDK_COPY_DEFAULT(bpp_pragma);
std::string fMacroName;
bpp_parser_fn_t fParse;
@@ -877,7 +877,7 @@ NDK_MODULE(NewOSPreprocessor) {
kFiles.emplace_back(argv[index]);
}
- if (kFiles.empty()) return MPCC_EXEC_ERROR;
+ if (kFiles.empty()) return NDK_EXEC_ERROR;
for (auto &file : kFiles) {
if (!std::filesystem::exists(file)) continue;
diff --git a/dev/ndkdll/Sources/CCompiler64x0.cxx b/dev/ndkdll/Sources/CCompiler64x0.cxx
index 3a6ffd2..3244c34 100644
--- a/dev/ndkdll/Sources/CCompiler64x0.cxx
+++ b/dev/ndkdll/Sources/CCompiler64x0.cxx
@@ -10,7 +10,7 @@
/// BUGS: 0
/// TODO: none
-#include <ndkdll/AsmKit/CPU/64x0.hxx>
+#include <ndkdll/Asm/CPU/64x0.hxx>
#include <ndkdll/Parser.hxx>
#include <ndkdll/UUID.hxx>
#include <filesystem>
@@ -148,7 +148,7 @@ public:
explicit CompilerBackend64x0() = default;
~CompilerBackend64x0() override = default;
- MPCC_COPY_DEFAULT(CompilerBackend64x0);
+ NDK_COPY_DEFAULT(CompilerBackend64x0);
std::string Check(const char* text, const char* file);
bool Compile(const std::string& text, const char* file) override;
@@ -371,7 +371,7 @@ bool CompilerBackend64x0::Compile(const std::string& text, const char* file)
if (expr.find(")") != std::string::npos)
expr.erase(expr.find(")"));
- kIfFunction = "__MPCC_IF_PROC_";
+ kIfFunction = "__NDK_IF_PROC_";
kIfFunction += std::to_string(time_off._Raw);
syntaxLeaf.fUserValue = "\tlda r12, import ";
@@ -1301,7 +1301,7 @@ public:
explicit AssemblyCCInterface() = default;
~AssemblyCCInterface() override = default;
- MPCC_COPY_DEFAULT(AssemblyCCInterface);
+ NDK_COPY_DEFAULT(AssemblyCCInterface);
[[maybe_unused]] static Int32 Arch() noexcept
{
diff --git a/dev/ndkdll/Sources/CCompilerPower64.cxx b/dev/ndkdll/Sources/CCompilerPower64.cxx
index 528ed8f..222b64f 100644
--- a/dev/ndkdll/Sources/CCompilerPower64.cxx
+++ b/dev/ndkdll/Sources/CCompilerPower64.cxx
@@ -7,7 +7,7 @@
* ========================================================
*/
-#include <ndkdll/AsmKit/CPU/ppc.hxx>
+#include <ndkdll/Asm/CPU/ppc.hxx>
#include <ndkdll/Parser.hxx>
#include <ndkdll/UUID.hxx>
#include <filesystem>
@@ -24,7 +24,7 @@
/// @author Amlal El Mahrouss (amlel)
/// @file cc.cxx
-/// @brief POWER C Compiler.
+/// @brief POWER64 C Compiler.
/////////////////////
@@ -139,7 +139,7 @@ public:
explicit CompilerBackendPower64() = default;
~CompilerBackendPower64() override = default;
- MPCC_COPY_DEFAULT(CompilerBackendPower64);
+ NDK_COPY_DEFAULT(CompilerBackendPower64);
std::string Check(const char* text, const char* file);
bool Compile(const std::string& text, const char* file) override;
@@ -381,7 +381,7 @@ bool CompilerBackendPower64::Compile(const std::string& text, const char* file)
if (expr.find(")") != std::string::npos)
expr.erase(expr.find(")"));
- kIfFunction = "__MPCC_IF_PROC_";
+ kIfFunction = "__NDK_IF_PROC_";
kIfFunction += std::to_string(time_off._Raw);
syntaxLeaf.fUserValue =
@@ -1324,7 +1324,7 @@ public:
explicit AssemblyMountpointCLang() = default;
~AssemblyMountpointCLang() override = default;
- MPCC_COPY_DEFAULT(AssemblyMountpointCLang);
+ NDK_COPY_DEFAULT(AssemblyMountpointCLang);
[[maybe_unused]] static Int32 Arch() noexcept
{
diff --git a/dev/ndkdll/Sources/CPlusPlusCompilerAMD64.cxx b/dev/ndkdll/Sources/CPlusPlusCompilerAMD64.cxx
index 535a3fb..02e4812 100644
--- a/dev/ndkdll/Sources/CPlusPlusCompilerAMD64.cxx
+++ b/dev/ndkdll/Sources/CPlusPlusCompilerAMD64.cxx
@@ -20,7 +20,7 @@
// import, @MLAutoRelease { ... }, fn foo() -> auto { ... }
-#include <ndkdll/AsmKit/CPU/amd64.hxx>
+#include <ndkdll/Asm/CPU/amd64.hxx>
#include <ndkdll/Parser.hxx>
#include <UUID.hxx>
@@ -33,13 +33,13 @@
#include <utility>
#include <vector>
-/* ZKA C++ driver */
+/* ZKA C++ Compiler driver */
/* This is part of NDK. */
/* (c) ZKA Technologies */
/// @author Amlal El Mahrouss (amlel)
/// @file cc.cxx
-/// @brief Optimized C++ Compiler.
+/// @brief Optimized C++ Compiler Driver.
/// @todo Throw error for scoped inside scoped variables when they get referenced outside.
/// @todo Add class/struct/enum support.
@@ -55,7 +55,7 @@
/////////////////////////////////////
-// INTERNALS OF THE C COMPILER
+// INTERNALS OF THE C++ COMPILER
/////////////////////////////////////
@@ -105,7 +105,7 @@ namespace detail
/// @param reason the reason of the error.
/// @param file where does it originate from?
void print_error_asm(std::string reason, std::string file) noexcept;
-
+
struct CompilerType
{
std::string fName;
@@ -151,7 +151,7 @@ public:
explicit CompilerBackendCPlusPlus() = default;
~CompilerBackendCPlusPlus() override = default;
- MPCC_COPY_DEFAULT(CompilerBackendCPlusPlus);
+ NDK_COPY_DEFAULT(CompilerBackendCPlusPlus);
bool Compile(const std::string& text, const char* file) override;
@@ -404,7 +404,7 @@ bool CompilerBackendCPlusPlus::Compile(const std::string& text,
ch = '_';
}
- syntax_tree.fUserValue = "export .code64 __MPCC_" + fnName + "\n";
+ syntax_tree.fUserValue = "export .code64 __NDK_" + fnName + "\n";
++kLevelFunction;
}
@@ -732,7 +732,7 @@ public:
explicit AssemblyCPlusPlusInterface() = default;
~AssemblyCPlusPlusInterface() override = default;
- MPCC_COPY_DEFAULT(AssemblyCPlusPlusInterface);
+ NDK_COPY_DEFAULT(AssemblyCPlusPlusInterface);
[[maybe_unused]]
static Int32 Arch() noexcept
diff --git a/dev/ndkdll/Sources/Detail/asmutils.hxx b/dev/ndkdll/Sources/Detail/asmutils.hxx
index 2451a28..b52329d 100644
--- a/dev/ndkdll/Sources/Detail/asmutils.hxx
+++ b/dev/ndkdll/Sources/Detail/asmutils.hxx
@@ -6,7 +6,7 @@
#pragma once
-#include <ndkdll/AsmKit/AsmKit.hxx>
+#include <ndkdll/Asm/Asm.hxx>
#include <ndkdll/Parser.hxx>
using namespace NDK;
diff --git a/dev/ndkdll/Sources/Detail/compilerutils.hxx b/dev/ndkdll/Sources/Detail/compilerutils.hxx
index ba3fb79..84312a2 100644
--- a/dev/ndkdll/Sources/Detail/compilerutils.hxx
+++ b/dev/ndkdll/Sources/Detail/compilerutils.hxx
@@ -6,7 +6,7 @@
#pragma once
-#include <ndkdll/AsmKit/AsmKit.hxx>
+#include <ndkdll/Asm/Asm.hxx>
#include <ndkdll/Parser.hxx>
#define kZero64Section ".zero64"
diff --git a/dev/ndkdll/Sources/Linker.cxx b/dev/ndkdll/Sources/Linker.cxx
index 9243531..fe1690e 100644
--- a/dev/ndkdll/Sources/Linker.cxx
+++ b/dev/ndkdll/Sources/Linker.cxx
@@ -16,7 +16,7 @@
#include <ndkdll/NFC/ErrorID.hxx>
//! Assembler Kit
-#include <ndkdll/AsmKit/AsmKit.hxx>
+#include <ndkdll/Asm/Asm.hxx>
//! Preferred Executable Format
#include <ndkdll/NFC/PEF.hxx>
@@ -180,7 +180,7 @@ NDK_MODULE(NewOSLinker)
if (argv[i][0] == '/')
{
kStdOut << "link: unknown flag: " << argv[i] << "\n";
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
kObjectList.emplace_back(argv[i]);
@@ -192,14 +192,14 @@ NDK_MODULE(NewOSLinker)
if (kOutput.empty())
{
kStdOut << "link: no output filename set." << std::endl;
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
// sanity check.
if (kObjectList.empty())
{
kStdOut << "link: no input files." << std::endl;
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
else
{
@@ -213,7 +213,7 @@ NDK_MODULE(NewOSLinker)
// if filesystem doesn't find file
// -> throw error.
kStdOut << "link: no such file: " << obj << std::endl;
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
}
}
@@ -222,7 +222,7 @@ NDK_MODULE(NewOSLinker)
if (kArch == 0)
{
kStdOut << "link: no target architecture set, can't continue." << std::endl;
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
NDK::PEFContainer pef_container{};
@@ -253,7 +253,7 @@ NDK_MODULE(NewOSLinker)
kStdOut << "link: error: " << strerror(errno) << "\n";
}
- return MPCC_FILE_NOT_FOUND;
+ return NDK_FILE_NOT_FOUND;
}
//! Read AE to convert as PEF.
@@ -292,7 +292,7 @@ NDK_MODULE(NewOSLinker)
<< std::endl;
std::remove(kOutput.c_str());
- return MPCC_FAT_ERROR;
+ return NDK_FAT_ERROR;
}
else
{
@@ -398,7 +398,7 @@ NDK_MODULE(NewOSLinker)
std::remove(kOutput.c_str());
// don't continue, it is a fatal error.
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
pef_container.Cpu = archs;
@@ -689,7 +689,7 @@ NDK_MODULE(NewOSLinker)
}
std::remove(kOutput.c_str());
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
// step 2.5: write program bytes.
@@ -732,7 +732,7 @@ NDK_MODULE(NewOSLinker)
<< ", is corrupt, removing file...\n";
std::remove(kOutput.c_str());
- return MPCC_EXEC_ERROR;
+ return NDK_EXEC_ERROR;
}
return 0;