From 09edd92af071cab2a88967a3db5f93a5fd568e1a Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 12 Apr 2025 08:37:12 +0200 Subject: LibCompiler, C++: use 'jmp' when returning from a function. Signed-off-by: Amlal El Mahrouss --- dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc') 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; } -- cgit v1.2.3