[PATCH] D41968: [libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.

John Baldwin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 15:17:52 PST 2018


bsdjhb created this revision.
bsdjhb added a reviewer: sdardis.
Herald added a subscriber: arichardson.

For newabi this is fairly simple as we just save/restore the 32
floating-point registers as doubles.  For O32 MIPS provides a variety
of floating-point ABIs.  For O32 MIPS with 64-bit floating-point
registers, save/restore the 32 floating-point registers as doubles.
For O32 MIPS with 32-bit floating-point registers, save/restore the 16
even registers as doubles.  This probably isn't correct but does match
the existing libunwind ABI that expects to save/restore floating point
registers as doubles.

For O32 with 32-bit FPRs the sticky point is trying to distinguish if
a user of unw_get_fpreg() or unw_set_fpreg() is trying to operate on a
float or a double.  It's not clear to me what the right thing here is.
If the goal is just to save/restore individual registers then perhaps
the FPRs should always be stored as floats that get converted to doubles
when returned from unw_get_fpreg() and vice versa?


https://reviews.llvm.org/D41968

Files:
  include/__libunwind_config.h
  include/libunwind.h
  src/Registers.hpp
  src/UnwindRegistersRestore.S
  src/UnwindRegistersSave.S
  src/libunwind.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41968.129538.patch
Type: text/x-patch
Size: 17263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180111/e3e20e37/attachment-0001.bin>


More information about the cfe-commits mailing list