felixangell / kpd

an old compiler for Krug written in D - a prototype version
MIT License
44 stars 1 forks source link

remove all text based x64 code generation #75

Closed felixangell closed 6 years ago

felixangell commented 6 years ago

there are still a few instances where we spit out assembly manually like so:

        curr_ctx.alloc_instr_addr = writer.emitt("subq $0, %rsp");

Instead, writer.sub should be favoured, however in this specific case we need to do it like this so we can re-write instructions for backpatching.