Additional registers spilled on the stack #63
Labels
design
Something that influences the language's design
discussion
When you want to discuss about something
Milestone
This idea originally stemed from the fact that x64 has quite a lot more registers than x86.
N⋆ is meant to be a semi-portable assembly language, but it is impossible to restrict the entire language to the smallest register set available across all 32+bits platforms.
This was also recently seen in the magus project:
Instead, we propose that the number of registers be either unbounded (meaning that
%rN
withN ∈ ℕ
may be a virtual register depending on the target architecture) or large enough to accomodate to at least x64 (meaning that there would be at least 12 registers%r0
to%r11
).The first registers of this set would be mapped to the architecture's register (
eax
, etc) and all of the remaining registers would be strategically spilled on the stack. Although there is a very little performance hit from doing so, this allows not to worry too much about which registers are available or not when generating code from a compiler (from a user point of view too, but in this case the user itself could maybe use target-specific blocks — see #37 — for better handling of registers across multiple architectures).The text was updated successfully, but these errors were encountered: