summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-04-12 08:37:12 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-04-12 08:37:12 +0200
commit09edd92af071cab2a88967a3db5f93a5fd568e1a (patch)
tree3db6792273c07ede557a333c47bba1e8b073a4d5 /dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc
parent99fe704a5a8c4d049f1c4fef4151a64e0224e84b (diff)
LibCompiler, C++: use 'jmp' when returning from a function.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc')
-rw-r--r--dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc b/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc
index c81e746..62d1729 100644
--- a/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc
+++ b/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc
@@ -15,7 +15,7 @@
#define kExitNO (EXIT_FAILURE)
#define kSplashCxx() \
- kPrintF(kWhite "%s\n", "NeKernel C++ Compiler Driver, (c) 2024 Amlal El Mahrouss, all rights reserved.")
+ kPrintF(kWhite "%s\n", "NeKernel Optimized C++ Compiler Driver, (c) 2024-2025 Amlal El Mahrouss, All rights reserved.")
// extern_segment, @autodelete { ... }, fn foo() -> auto { ... }
@@ -830,7 +830,7 @@ Boolean CompilerFrontendCPlusPlus::Compile(std::string text,
std::stringstream ss;
ss << it->second;
- syntax_tree.fUserValue = "mov rax, " + ss.str() + "\nret\n";
+ syntax_tree.fUserValue = "jmp " + ss.str() + "\nret\n";
kOrigin += 1UL;
break;
}