3 ms·
Does this code generator spill to zero-page? Do you have to do anything special for allocations there?
by Scaevolus 4y ago
Does this code generator spill to zero-page? Do you have to do anything special for allocations there?
- pubby 4y agoSince it combines register allocation with instruction spilling is innate - there isn't a special spilling phase. Spilled variables are assigned ram addresses after code generation occurs at link time, with the most frequently used going to zeropage.
- coldacid 4y agoDoes it avoid ZP addresses with special purpose for the system when doing this?
- pubby 4y agoYeah it can reserve specific ZP addresses. I do this to implement the runtime. It can also be used to reserve hardware registers, but since my only target is the NES, I don't have to worry about that.