[libunwind][Mips] Fix the o32 register save/restore code for MIPS I (#246542)
MIPS I has no ldc1/sdc1, so UnwindRegistersSave.S and
UnwindRegistersRestore.S do not assemble for hard-float o32 on MIPS I.
For FP32, save and restore each register with swc1/lwc1 instead. Each
even/odd register pair is in one 8-byte slot, with the even register in
the first half, which is where getRegister() expects it. Use .set
oddspreg so this also assembles with -mno-odd-spreg.
jumpto() also loads $8 and moves it to HI right away with mthi, then
does the same for LO. The code is in .set noreorder, so on MIPS I mthi
and mtlo read $8 in the load delay slot and get the old value. Load HI
into $8 and LO into $9 first, then do the mthi and mtlo. Both registers
are restored from the context afterwards.
jumpto() then loads $4 in the delay slot of the jr. On MIPS I the first
instruction at the new pc cannot use $4 yet, and a landing pad gets the
exception object in $4. Load $4 before the jr and put a nop in the
delay slot.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>