martinmcclure / mist

Filetree code for the Mist project (mist-project.org)
32 stars 5 forks source link

Stop using rbp as a frame pointer #8

Closed martinmcclure closed 11 years ago

martinmcclure commented 11 years ago

The x86_64 ABI lists rbp as " callee-saved register; optionally used as frame pointer. Currently, Fog uses rbp as a frame pointer, accessing temporary variables relative to rbp.

However, this is optional, and I've since learned that C does not use rbp this way. C essentially uses rsp as a frame pointer, leaving rbp free for other uses. We should do the same.

martinmcclure commented 11 years ago

Using rsp-relative temp locations is working. Freeing rbp to be used as a general-purpose register is currently waiting on AsmJit issue 10 -- AsmJit has no idea what the register bpl is as an operand.

martinmcclure commented 11 years ago

Now working with RBP as an assignable register, with the latest committed AsmJit.