]> Witch of Git - ivy/commit
Add skeleton of x64 compilation code
authorCassie Jones <code@witchoflight.com>
Sat, 29 Feb 2020 16:56:45 +0000 (17:56 +0100)
committerCassie Jones <code@witchoflight.com>
Sat, 29 Feb 2020 16:56:45 +0000 (17:56 +0100)
commitd928eca5337ec50e30f6c6020d0b2074106b9d88
tree5b532b1d8837ad6c1c93dc526634113fab8912d0
parent4359f2bcbd685b9b142dc4b1a4bf73318d9dfc32
Add skeleton of x64 compilation code

We compile the globals and functions in the program into a list of
global labels and definitions. Add a bunch of instruction and etc. types
here for formatting. Then, assemble all of this together in the program.
The program realigns the stack (probably overkill?) and then calls into
the entry point symbol, then exits.

I added ivy_exit so that I wouldn't have to refer to any
platform-specific symbols in the assembly that's emitted, all of that
can be handled by the runtime. Unfortunately there will still be
platform specific behavior because of different calling conventions.
rt/src/lib.rs
src/main.rs
src/trans.rs
src/trans/x64.rs [new file with mode: 0644]