summaryrefslogtreecommitdiffhomepage
path: root/src/CompilerKit
diff options
context:
space:
mode:
Diffstat (limited to 'src/CompilerKit')
-rw-r--r--src/CompilerKit/src/Backends/Assembler+AMD64.cpp62
-rw-r--r--src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp2
-rw-r--r--src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp4
-rw-r--r--src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp45
-rw-r--r--src/CompilerKit/src/Generators/DynamicLinker64+MachO.cpp16
-rw-r--r--src/CompilerKit/src/Preprocess/Preprocessor+Generic.cpp24
-rw-r--r--src/CompilerKit/test/Compilers/NectarCodegen.test.cpp6
-rw-r--r--src/CompilerKit/test/Linkers/DynamicLinker64+MachO.test.cpp4
-rw-r--r--src/CompilerKit/test/Linkers/DynamicLinker64+PEF.test.cpp4
9 files changed, 79 insertions, 88 deletions
diff --git a/src/CompilerKit/src/Backends/Assembler+AMD64.cpp b/src/CompilerKit/src/Backends/Assembler+AMD64.cpp
index f064a39..e0f7eef 100644
--- a/src/CompilerKit/src/Backends/Assembler+AMD64.cpp
+++ b/src/CompilerKit/src/Backends/Assembler+AMD64.cpp
@@ -103,21 +103,21 @@ NECTAR_MODULE(AssemblerMainAMD64) {
//////////////// CPU OPCODES END ////////////////
- for (i64_hword_t i{1}; i < argc; ++i) {
+ for (i64_hword_t i{1}; i < argc; ++i) {
if (argv[i][0] == '-') {
if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) {
kStdOut
<< "AssemblerAMD64: AMD64 Assembler Driver.\nAssemblerAMD64: Copyright (c) 2024-2026 "
"Amlal El Mahrouss\n";
- kStdOut
- << "AssemblerAMD64: This software is part of the Ne.org project. (https://www.nekernel.org)\n";
+ kStdOut << "AssemblerAMD64: This software is part of the Ne.org project. "
+ "(https://www.nekernel.org)\n";
return 0;
} else if (strcmp(argv[i], "-help") == 0) {
kStdOut
<< "AssemblerAMD64: AMD64 Assembler Driver.\nAssemblerAMD64: Copyright (c) 2024-2026 "
"Amlal El Mahrouss\n";
- kStdOut
- << "AssemblerAMD64: This Software is part of the Ne.org project. (https://www.nekernel.org)\n";
+ kStdOut << "AssemblerAMD64: This Software is part of the Ne.org project. "
+ "(https://www.nekernel.org)\n";
kStdOut << "-version: Print program version.\n";
kStdOut << "-fverbose: Print verbose output.\n";
kStdOut << "-fbinary: Output as flat binary.\n";
@@ -890,10 +890,11 @@ bool CompilerKit::EncoderAMD64::WriteNumber8(const std::size_t& pos, std::string
/////////////////////////////////////////////////////////////////////////////////////////
-bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerKit::STLString file) {
+bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line,
+ CompilerKit::STLString file) {
if (CompilerKit::ast_find_needle(line, "public_segment ")) return true;
if (CompilerKit::ast_find_needle(line, "extern_segment ")) return true;
-
+
struct RegMapAMD64 final {
CompilerKit::STLString fName;
i64_byte_t fModRM;
@@ -917,9 +918,9 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK
/// Move instruction handler.
if (line.find(name) != std::string::npos) {
- if ((line.find(name) + name.size()) > line.size()) continue;
-
- if (name == "mov" || name == "xor") {
+ if ((line.find(name) + name.size()) > line.size()) continue;
+
+ if (name == "mov" || name == "xor") {
std::string substr = line.substr(line.find(name) + name.size());
uint64_t bits = kRegisterBitWidth;
@@ -1123,7 +1124,7 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK
std::vector<RegMapAMD64> currentRegList;
- currentRegList.reserve(3);
+ currentRegList.reserve(3);
for (auto reg : kRegisterList) {
std::string registerName;
@@ -1205,7 +1206,7 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK
}
if (onlyOneReg && currentRegList.size() > 0) {
- auto num = GetNumber32(line, ",");
+ auto num = GetNumber32(line, ",");
auto modrm = (0x3 << 6 | currentRegList[0].fModRM);
kAppBytes.emplace_back(0xC7); // prefixed before placing the modrm and then the number.
@@ -1221,20 +1222,19 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK
break;
}
-
- if (currentRegList.size() > 0) {
- if (currentRegList[1].fName[0] == 'r' && currentRegList[0].fName[0] == 'e') {
- CompilerKit::Detail::print_error("Invalid combination of operands and registers.",
- "CompilerKit");
- throw std::runtime_error("comb_op_reg");
- }
-
- if (currentRegList[0].fName[0] == 'r' && currentRegList[1].fName[0] == 'e') {
- CompilerKit::Detail::print_error("Invalid combination of operands and registers.",
- "CompilerKit");
- throw std::runtime_error("comb_op_reg");
- }
- }
+ if (currentRegList.size() > 0) {
+ if (currentRegList[1].fName[0] == 'r' && currentRegList[0].fName[0] == 'e') {
+ CompilerKit::Detail::print_error("Invalid combination of operands and registers.",
+ "CompilerKit");
+ throw std::runtime_error("comb_op_reg");
+ }
+
+ if (currentRegList[0].fName[0] == 'r' && currentRegList[1].fName[0] == 'e') {
+ CompilerKit::Detail::print_error("Invalid combination of operands and registers.",
+ "CompilerKit");
+ throw std::runtime_error("comb_op_reg");
+ }
+ }
if (bits == 16) {
if (currentRegList[0].fName[0] == 'r' || currentRegList[0].fName[0] == 'e') {
@@ -1282,8 +1282,8 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK
// Register lookup table
struct RegInfo final {
- CompilerKit::STLString name;
- i64_byte_t code;
+ CompilerKit::STLString name;
+ i64_byte_t code;
};
RegInfo regs64[] = {{"rax", 0}, {"rcx", 1}, {"rdx", 2}, {"rbx", 3},
@@ -1533,8 +1533,8 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK
// Register lookup table
struct RegInfo final {
- CompilerKit::STLString name;
- i64_byte_t code;
+ CompilerKit::STLString name;
+ i64_byte_t code;
};
RegInfo regs64[] = {{"rax", 0}, {"rcx", 1}, {"rdx", 2}, {"rbx", 3},
@@ -1827,7 +1827,7 @@ bool CompilerKit::EncoderAMD64::WriteLine(CompilerKit::STLString line, CompilerK
}
}
}
-
+
/// write a dword
else if (auto pos = line.find(".dword"); pos != std::string::npos) {
this->WriteNumber32(pos + strlen(".dword") + 1, line);
diff --git a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp
index 9ea310f..1dc24a0 100644
--- a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp
+++ b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp
@@ -16,7 +16,7 @@
*/
namespace CompilerKit {
-
+
///! @brief Compile for specific format (ELF, PEF, AE)
Int32 AssemblyFactory::Compile(STLString sourceFile, const Int32& arch) {
if (sourceFile.length() == 0) return NECTAR_UNIMPLEMENTED;
diff --git a/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp
index e299b06..f5ac27f 100644
--- a/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp
+++ b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp
@@ -240,13 +240,13 @@ static std::vector<CompilerKit::STLString> kRegisterConventionCallList = {
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
};
-static std::size_t kFunctionEmbedLevel{};
+static std::size_t kFunctionEmbedLevel{};
static CompilerKit::STLString kCurrentIfSymbol{};
static CompilerKit::STLString kCurrentReturnAddress{};
-static bool kCurrentIfCondition{false};
+static bool kCurrentIfCondition{false};
const char* CompilerFrontendNectarAMD64::Language() {
return "Common Nectar (AMD64)";
diff --git a/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp
index 4b7fa5f..a7136b8 100644
--- a/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp
+++ b/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp
@@ -231,18 +231,17 @@ class CompilerFrontendNectarPTX final CK_COMPILER_FRONTEND {
static CompilerFrontendNectarPTX* kFrontend = nullptr;
-static constexpr const char* kPtxRetReg = "%rd0";
-static constexpr const char* kPtxTmpRegA = "%rd1";
-static constexpr const char* kPtxTmpRegB = "%rd2";
-static constexpr const char* kPtxThisReg = "%rd3";
-static constexpr const char* kPtxPredReg = "%p1";
+static constexpr const char* kPtxRetReg = "%rd0";
+static constexpr const char* kPtxTmpRegA = "%rd1";
+static constexpr const char* kPtxTmpRegB = "%rd2";
+static constexpr const char* kPtxThisReg = "%rd3";
+static constexpr const char* kPtxPredReg = "%p1";
static std::vector<CompilerKit::STLString> kRegisterList = {
- "%rd16", "%rd17", "%rd18", "%rd19", "%rd20", "%rd21", "%rd22", "%rd23",
- "%rd24", "%rd25", "%rd26", "%rd27", "%rd28", "%rd29", "%rd30", "%rd31",
- "%rd32", "%rd33", "%rd34", "%rd35", "%rd36", "%rd37", "%rd38", "%rd39",
- "%rd40", "%rd41", "%rd42", "%rd43", "%rd44", "%rd45", "%rd46", "%rd47",
- "%rd48", "%rd49", "%rd50", "%rd51", "%rd52", "%rd53", "%rd54", "%rd55",
+ "%rd16", "%rd17", "%rd18", "%rd19", "%rd20", "%rd21", "%rd22", "%rd23", "%rd24", "%rd25",
+ "%rd26", "%rd27", "%rd28", "%rd29", "%rd30", "%rd31", "%rd32", "%rd33", "%rd34", "%rd35",
+ "%rd36", "%rd37", "%rd38", "%rd39", "%rd40", "%rd41", "%rd42", "%rd43", "%rd44", "%rd45",
+ "%rd46", "%rd47", "%rd48", "%rd49", "%rd50", "%rd51", "%rd52", "%rd53", "%rd54", "%rd55",
"%rd56", "%rd57", "%rd58", "%rd59", "%rd60", "%rd61", "%rd62", "%rd63",
};
@@ -406,7 +405,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendNectarPTX::Compile(
CompilerKit::STLString{kPtxPredReg} + ", " +
CompilerKit::STLString{kPtxTmpRegA} + ", " +
CompilerKit::STLString{kPtxTmpRegB} + ";\n";
- syntax_tree.fUserValue += "@"+ CompilerKit::STLString{kPtxPredReg} + " bra __ret_" +
+ syntax_tree.fUserValue += "@" + CompilerKit::STLString{kPtxPredReg} + " bra __ret_" +
std::to_string(kOrigin) + "_" + kCurrentIfSymbol + ";\n";
kCurrentIfSymbol = std::to_string(kOrigin) + "_" + kCurrentIfSymbol;
@@ -575,8 +574,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendNectarPTX::Compile(
case CompilerKit::KeywordKind::kKeywordKindNew: {
if (auto pos = syntax_tree.fUserValue.find(keyword.first.fKeywordName);
pos != CompilerKit::STLString::npos) {
- syntax_tree.fUserValue.replace(pos, keyword.first.fKeywordName.size(),
- "__operator_new");
+ syntax_tree.fUserValue.replace(pos, keyword.first.fKeywordName.size(), "__operator_new");
}
continue;
@@ -645,9 +643,8 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendNectarPTX::Compile(
}
if (!nectar_get_variable_ref(nameVar).empty())
- syntax_tree.fUserValue +=
- "mov.u64 " + CompilerKit::STLString{kPtxThisReg} + ", " +
- nectar_get_variable_ref(nameVar) + ";\n";
+ syntax_tree.fUserValue += "mov.u64 " + CompilerKit::STLString{kPtxThisReg} + ", " +
+ nectar_get_variable_ref(nameVar) + ";\n";
if (CompilerKit::KeywordKind::kKeywordKindFunctionAccess != keyword.first.fKeywordKind)
method = valueOfVar.erase(valueOfVar.find("("));
@@ -676,8 +673,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendNectarPTX::Compile(
}
}
- if (!arg.empty())
- buf += "mov.u64 %rd" + std::to_string(index) + ", " + val + ";\n";
+ if (!arg.empty()) buf += "mov.u64 %rd" + std::to_string(index) + ", " + val + ";\n";
arg.clear();
++index;
@@ -694,7 +690,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendNectarPTX::Compile(
syntax_tree.fUserValue += "call.uni ";
syntax_tree.fUserValue +=
(keyword.first.fKeywordName.ends_with('>') ? nectar_get_variable_ref(nameVar)
- : nectar_get_variable_ref(nameVar)) +
+ : nectar_get_variable_ref(nameVar)) +
method + ";\n";
} else {
auto res = buf;
@@ -854,9 +850,8 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendNectarPTX::Compile(
kExternalSymbols.insert(mangled + valueOfVar);
syntax_tree.fUserValue += "call " + mangled + valueOfVar + ";\n";
- syntax_tree.fUserValue +=
- instr + nectar_get_variable_ref(varName) + ", " +
- CompilerKit::STLString{kPtxRetReg} + ";\n";
+ syntax_tree.fUserValue += instr + nectar_get_variable_ref(varName) + ", " +
+ CompilerKit::STLString{kPtxRetReg} + ";\n";
}
break;
@@ -1432,7 +1427,7 @@ static CompilerKit::STLString nectar_generate_constructor_call(
nectar_pop_scope();
CompilerKit::STLString code;
- auto objReg = nectar_allocate_register(obj_name);
+ auto objReg = nectar_allocate_register(obj_name);
if (!objReg.empty()) {
code += "mov.u64 " + CompilerKit::STLString{kPtxThisReg} + ", " + objReg + ";\n";
}
@@ -1467,8 +1462,8 @@ static CompilerKit::STLString nectar_generate_destructor_call(
static void nectar_process_function_parameters(const std::vector<CompilerKit::STLString>& args) {
for (size_t i = 0; i < args.size(); ++i) {
VariableInfo param;
- param.fName = "arg" + std::to_string(i);
- param.fLocation = VarLocation::kRegister;
+ param.fName = "arg" + std::to_string(i);
+ param.fLocation = VarLocation::kRegister;
if (i < kRegisterConventionCallList.size()) {
param.fRegister = kRegisterConventionCallList[i];
} else {
diff --git a/src/CompilerKit/src/Generators/DynamicLinker64+MachO.cpp b/src/CompilerKit/src/Generators/DynamicLinker64+MachO.cpp
index 911b582..823fbd4 100644
--- a/src/CompilerKit/src/Generators/DynamicLinker64+MachO.cpp
+++ b/src/CompilerKit/src/Generators/DynamicLinker64+MachO.cpp
@@ -363,8 +363,7 @@ NECTAR_MODULE(DynamicLinker64MachO) {
UInt32 symtabCmdSize = sizeof(symtab_command);
UInt32 dysymtabCmdSize = sizeof(dysymtab_command);
UInt32 linkeditCmdSize = sizeof(segment_command_64); // No sections
- UInt32 dylinkerCmdSize =
- (13 + 1 + 7) & ~7; // "/usr/lib/dyld" + padding to 8-byte align
+ UInt32 dylinkerCmdSize = (13 + 1 + 7) & ~7; // "/usr/lib/dyld" + padding to 8-byte align
sizeOfCmds = pageZeroSize + textSegCmdSize + dataSegCmdSize + buildCmdSize + uuidCmdSize +
symtabCmdSize + dysymtabCmdSize + linkeditCmdSize;
@@ -515,12 +514,12 @@ NECTAR_MODULE(DynamicLinker64MachO) {
output_fc.write(reinterpret_cast<const char*>(&linkeditSegment), sizeof(linkeditSegment));
// Write LC_LOAD_DYLINKER command
- constexpr const char* dyldPath = "/usr/lib/dyld";
- std::vector<char> dylinkerCmd(dylinkerCmdSize, 0);
- dylinker_command* dylinker = reinterpret_cast<dylinker_command*>(dylinkerCmd.data());
- dylinker->cmd = LC_LOAD_DYLINKER;
- dylinker->cmdsize = dylinkerCmdSize;
- dylinker->name.offset = sizeof(dylinker_command);
+ constexpr const char* dyldPath = "/usr/lib/dyld";
+ std::vector<char> dylinkerCmd(dylinkerCmdSize, 0);
+ dylinker_command* dylinker = reinterpret_cast<dylinker_command*>(dylinkerCmd.data());
+ dylinker->cmd = LC_LOAD_DYLINKER;
+ dylinker->cmdsize = dylinkerCmdSize;
+ dylinker->name.offset = sizeof(dylinker_command);
std::memcpy(dylinkerCmd.data() + sizeof(dylinker_command), dyldPath, strlen(dyldPath) + 1);
output_fc.write(dylinkerCmd.data(), dylinkerCmd.size());
@@ -623,7 +622,6 @@ NECTAR_MODULE(DynamicLinker64MachO) {
output_fc.write(reinterpret_cast<const char*>(&sym), sizeof(nlist_64));
}
-
// Write string table
output_fc.write(kStringTable.data(), kStringTable.size());
diff --git a/src/CompilerKit/src/Preprocess/Preprocessor+Generic.cpp b/src/CompilerKit/src/Preprocess/Preprocessor+Generic.cpp
index e2d20df..555ea8b 100644
--- a/src/CompilerKit/src/Preprocess/Preprocessor+Generic.cpp
+++ b/src/CompilerKit/src/Preprocess/Preprocessor+Generic.cpp
@@ -21,8 +21,7 @@
/// @file Preprocessor+Generic.cpp
/// @brief Nectar Preprocessor.
-using pp_parser_fn_t = Int32 (*)(CompilerKit::STLString&, std::ifstream&,
- std::ofstream&);
+using pp_parser_fn_t = Int32 (*)(CompilerKit::STLString&, std::ifstream&, std::ofstream&);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -259,8 +258,7 @@ void pp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) {
if (inactive_code) {
if (hdr_line.find("#endif") == CompilerKit::STLString::npos) {
continue;
- } else if (hdr_line[0] == '#' &&
- hdr_line.find("#endif") != CompilerKit::STLString::npos) {
+ } else if (hdr_line[0] == '#' && hdr_line.find("#endif") != CompilerKit::STLString::npos) {
inactive_code = false;
}
}
@@ -491,8 +489,7 @@ void pp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) {
continue;
}
- } else if (hdr_line[0] == '#' &&
- hdr_line.find("else") != CompilerKit::STLString::npos) {
+ } else if (hdr_line[0] == '#' && hdr_line.find("else") != CompilerKit::STLString::npos) {
if (!defined && inactive_code) {
inactive_code = false;
defined = true;
@@ -504,8 +501,7 @@ void pp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) {
continue;
}
- } else if (hdr_line[0] == '#' &&
- hdr_line.find("ifdef") != CompilerKit::STLString::npos) {
+ } else if (hdr_line[0] == '#' && hdr_line.find("ifdef") != CompilerKit::STLString::npos) {
auto ifdef_pos = hdr_line.find("ifdef");
if (ifdef_pos == CompilerKit::STLString::npos) continue;
@@ -545,8 +541,7 @@ void pp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) {
break;
}
}
- } else if (hdr_line[0] == '#' &&
- hdr_line.find("if") != CompilerKit::STLString::npos) {
+ } else if (hdr_line[0] == '#' && hdr_line.find("if") != CompilerKit::STLString::npos) {
inactive_code = true;
std::vector<Detail::pp_macro_condition> pp_macro_condition_list = {
@@ -630,8 +625,7 @@ void pp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) {
break;
}
}
- } else if (hdr_line[0] == '#' &&
- hdr_line.find("warning") != CompilerKit::STLString::npos) {
+ } else if (hdr_line[0] == '#' && hdr_line.find("warning") != CompilerKit::STLString::npos) {
auto warning_pos = hdr_line.find("warning");
if (warning_pos == CompilerKit::STLString::npos) continue;
@@ -647,8 +641,7 @@ void pp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) {
}
std::cerr << "warn: " << message << std::endl;
- } else if (hdr_line[0] == '#' &&
- hdr_line.find("error") != CompilerKit::STLString::npos) {
+ } else if (hdr_line[0] == '#' && hdr_line.find("error") != CompilerKit::STLString::npos) {
auto error_pos = hdr_line.find("error");
if (error_pos == CompilerKit::STLString::npos) continue;
@@ -664,8 +657,7 @@ void pp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) {
}
throw std::runtime_error("error: " + message);
- } else if (hdr_line[0] == '#' &&
- hdr_line.find("include ") != CompilerKit::STLString::npos) {
+ } else if (hdr_line[0] == '#' && hdr_line.find("include ") != CompilerKit::STLString::npos) {
auto include_pos = hdr_line.find("include ");
if (include_pos == CompilerKit::STLString::npos) continue;
diff --git a/src/CompilerKit/test/Compilers/NectarCodegen.test.cpp b/src/CompilerKit/test/Compilers/NectarCodegen.test.cpp
index 581bfb8..e9632d9 100644
--- a/src/CompilerKit/test/Compilers/NectarCodegen.test.cpp
+++ b/src/CompilerKit/test/Compilers/NectarCodegen.test.cpp
@@ -11,11 +11,13 @@
TEST(CodegenTest, BasicCodegenTestGrep) {
// Compile C++ source to assembly
- auto compile_result = std::system("pef-amd64-necdrv ../../../../snippets/test_snippets/inner.nc > /dev/null 2>&1");
+ auto compile_result =
+ std::system("pef-amd64-necdrv ../../../../snippets/test_snippets/inner.nc > /dev/null 2>&1");
EXPECT_TRUE(compile_result == 0) << "C++ compiler driver failed to compile sample.cc";
}
TEST(CodegenTest, BasicCodegenTestAssemble) {
- auto expr = std::system("pef-amd64-asm ../../../../snippets/test_snippets/inner.masm > /dev/null 2>&1");
+ auto expr =
+ std::system("pef-amd64-asm ../../../../snippets/test_snippets/inner.masm > /dev/null 2>&1");
EXPECT_TRUE(expr == 0) << "ASM Driver did not compile the easy ASM unit.";
}
diff --git a/src/CompilerKit/test/Linkers/DynamicLinker64+MachO.test.cpp b/src/CompilerKit/test/Linkers/DynamicLinker64+MachO.test.cpp
index 8f3ff6b..6cd2167 100644
--- a/src/CompilerKit/test/Linkers/DynamicLinker64+MachO.test.cpp
+++ b/src/CompilerKit/test/Linkers/DynamicLinker64+MachO.test.cpp
@@ -47,6 +47,8 @@ TEST(LinkerRunMachO, LinkerExitsCorrectly) {
return;
}
- auto ret =(entrypoint_cxx(argc, const_cast<const char**>(argv)) == NECTAR_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE;
+ auto ret = (entrypoint_cxx(argc, const_cast<const char**>(argv)) == NECTAR_SUCCESS)
+ ? EXIT_SUCCESS
+ : EXIT_FAILURE;
EXPECT_TRUE(ret == EXIT_SUCCESS);
}
diff --git a/src/CompilerKit/test/Linkers/DynamicLinker64+PEF.test.cpp b/src/CompilerKit/test/Linkers/DynamicLinker64+PEF.test.cpp
index b0b00fa..e67916a 100644
--- a/src/CompilerKit/test/Linkers/DynamicLinker64+PEF.test.cpp
+++ b/src/CompilerKit/test/Linkers/DynamicLinker64+PEF.test.cpp
@@ -47,6 +47,8 @@ TEST(LinkerRunMachO, LinkerExitsCorrectly) {
return;
}
- auto ret =(entrypoint_cxx(argc, const_cast<const char**>(argv)) == NECTAR_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE;
+ auto ret = (entrypoint_cxx(argc, const_cast<const char**>(argv)) == NECTAR_SUCCESS)
+ ? EXIT_SUCCESS
+ : EXIT_FAILURE;
EXPECT_TRUE(ret == EXIT_SUCCESS);
}