diff options
Diffstat (limited to 'cpp.cpp')
-rw-r--r-- | cpp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,6 +1,7 @@ #include "cpp.h" #include "asm/encode.h" +#include "asm/operators.h" #include "bnf.h" #include "cppbnf.h" #include "debug.h" @@ -584,13 +585,13 @@ void CPP::link() // TODO // mSegment -> elf -#if 0 - return { + + mCode = std::vector<uint8_t>{ 0x48, 0xc7, 0xc0, 0x3c, 0x00, 0x00, 0x00, // mov $0x3c,%rax # syscall 60 0x48, 0x31, 0xff, // xor %rdi,%rdi # exit code 0 + } + mSegment.getCode() + std::vector<uint8_t>{ // add to edi 0x0f, 0x05, // syscall }; -#endif } // phases of translation, according to standard |