bootstrap4 currently uses an ad-hoc calling convention. After #1 is implemented we could create macros for a function prefix/suffix that would allow us to automatically save and restore a set of registers to the stack on function entry/exit.
There is currently a calling convention in bootstrap5 but that might be too much and too complex for this particular stage. It might be best to just always assume that there are 8 parameters to every function and create the prefix and suffix with that assumption.
This is a pretty big chunk of work as it requires refactoring almost every function in this file.
bootstrap4currently uses an ad-hoc calling convention. After #1 is implemented we could create macros for a function prefix/suffix that would allow us to automatically save and restore a set of registers to the stack on function entry/exit.There is currently a calling convention in
bootstrap5but that might be too much and too complex for this particular stage. It might be best to just always assume that there are 8 parameters to every function and create the prefix and suffix with that assumption.This is a pretty big chunk of work as it requires refactoring almost every function in this file.