Closed r-burns closed 1 year ago
MWCC EPPC 1.3.2 inserts calls to _savegpr_*/_restgpr_* helper jump points to save/restore callee-save registers. Example:
_savegpr_*
_restgpr_*
https://github.com/doldecomp/kar/blob/45ef055d8ed7b6f0479564d8b4c9c5c1f225f1e5/asm/sysdolphin/tobj.s#L42
These runtime "functions" are defined here:
https://github.com/doldecomp/kar/blob/45ef055d8ed7b6f0479564d8b4c9c5c1f225f1e5/asm/runtime/runtime.s#L89-L209
Note that these are not ordinary functions as they preserve all caller-save registers. Essentially, m2c needs to know that
bl _savegpr_27
is exactly equivalent to
stw r27, -0x14(r11) stw r28, -0x10(r11) stw r29, -0xc(r11) stw r30, -8(r11) stw r31, -4(r11)
(and so forth for the other save/restore helpers)
MWCC EPPC 1.3.2 inserts calls to
_savegpr_*
/_restgpr_*
helper jump points to save/restore callee-save registers. Example:https://github.com/doldecomp/kar/blob/45ef055d8ed7b6f0479564d8b4c9c5c1f225f1e5/asm/sysdolphin/tobj.s#L42
These runtime "functions" are defined here:
https://github.com/doldecomp/kar/blob/45ef055d8ed7b6f0479564d8b4c9c5c1f225f1e5/asm/runtime/runtime.s#L89-L209
Note that these are not ordinary functions as they preserve all caller-save registers. Essentially, m2c needs to know that
is exactly equivalent to
(and so forth for the other save/restore helpers)