For newabi this is fairly simple as we just save/restore the 32MIPS ABIs with 64-bit floating point registers including newabi
and O32 with 64-bit floating- point registers as doubles. For O32 MIPS provides a variety, just save and restore the
of32 floating-point ABIs. registers as doubles.
For O32 MIPS with 6432-bit floating-pointint registers, save and restore the
registers, save/restore the 32 floating-pointindividual floating-point registers as "plain" registers as doubles.. These registers
For O32 MIPS with 32-bit floating-point registersare encoded as floats rather than doubles, save/restore the 16but the DWARF unwinder
even registers as doubles. This probably isn't correct but does matchassumes that floating-point registers are stored as doubles when reading
the existing libunwind ABI that expects to save/restore flothem from memory (via AddressSpace::getDouble()). Treating pointthe
registers as doubles.
For O32 with 32-bit FPRs the sticky point is trying to distinguish if"normal" registers instead causes the DWARF unwinder to
fetch them from memory as a 32-bit register. This does mean that for
O32 with 32-bit floating-point registers unw_get_fpreg() and
unw_set_fpreg() do not work. One would have to use unw_get_reg()
and unw_set_reg() instead. However, DWARF unwinding works
correctly as the DWARF CFI emits records for individual 32-bit
a user of unw_get_fpreg() or unw_set_fpreg() is trying to operate on afloating-point registers even when they are treated as doubles stored
float or a doublein paired registers. It's not clear to me what the right thing here is.If the lack of unw_get/set_fpreg() becomes a pressing
If the goal is just to save/restore individual registers then perhapsneed in the future for O32 MIPS we could add in special handling to
the FPRs should always be stored as floats that get converted to doublesmake it work.
when returned from unw_get_fpreg() and vice versa?