1) no fancy stuff like register renumbering
2) only the upper half of all registers are preserved currently
TODO:
- tests
- more tests
- docs
- still more tests
- optimize register usage
- tail call optimizations
- check which registers have to be preserved over sub calls
- preserve only necessary register sets
- allocate regs that have not to be preserved in the lower half of regs
- if too many regs have to be preserved then emit saveall/restoreall including save/restore return values around restoreall.
Register allocation now starts at #16 for each set, giving 16 preserved registers for sub calls. That should be enough for first tests.
SYNOPSIS: s. languages/imcc/docs/calling_conventions.pod
Have fun, leo