diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2018-05-15 22:44:56 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2018-05-15 22:44:56 +0000 |
| commit | c3f240f7dc0387a6efabb75ee86cd5b453e0b196 (patch) | |
| tree | f018ee40e5efe1f4a7f22fe8884c6351581b2574 /libunwind/include/libunwind.h | |
| parent | 85d3a702da8f937ab1a818411a2c3ba7df294279 (diff) | |
| download | bcm5719-llvm-c3f240f7dc0387a6efabb75ee86cd5b453e0b196.tar.gz bcm5719-llvm-c3f240f7dc0387a6efabb75ee86cd5b453e0b196.zip | |
[libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.
Summary:
For MIPS ABIs with 64-bit floating point registers including newabi
and O32 with 64-bit floating point registers, just save and restore the
32 floating-point registers as doubles.
For O32 MIPS with 32-bit floating-point registers, save and restore the
individual floating-point registers as "plain" registers. These registers
are encoded as floats rather than doubles, but the DWARF unwinder
assumes that floating-point registers are stored as doubles when reading
them from memory (via AddressSpace::getDouble()). Treating the
registers as "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
floating-point registers even when they are treated as doubles stored
in paired registers. If the lack of unw_get/set_fpreg() becomes a pressing
need in the future for O32 MIPS we could add in special handling to
make it work.
Reviewers: sdardis, compnerd
Reviewed By: sdardis
Differential Revision: https://reviews.llvm.org/D41968
llvm-svn: 332414
Diffstat (limited to 'libunwind/include/libunwind.h')
| -rw-r--r-- | libunwind/include/libunwind.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h index 04e31e8ea4e..8e3d3fe9af2 100644 --- a/libunwind/include/libunwind.h +++ b/libunwind/include/libunwind.h @@ -781,6 +781,38 @@ enum { UNW_MIPS_R29 = 29, UNW_MIPS_R30 = 30, UNW_MIPS_R31 = 31, + UNW_MIPS_F0 = 32, + UNW_MIPS_F1 = 33, + UNW_MIPS_F2 = 34, + UNW_MIPS_F3 = 35, + UNW_MIPS_F4 = 36, + UNW_MIPS_F5 = 37, + UNW_MIPS_F6 = 38, + UNW_MIPS_F7 = 39, + UNW_MIPS_F8 = 40, + UNW_MIPS_F9 = 41, + UNW_MIPS_F10 = 42, + UNW_MIPS_F11 = 43, + UNW_MIPS_F12 = 44, + UNW_MIPS_F13 = 45, + UNW_MIPS_F14 = 46, + UNW_MIPS_F15 = 47, + UNW_MIPS_F16 = 48, + UNW_MIPS_F17 = 49, + UNW_MIPS_F18 = 50, + UNW_MIPS_F19 = 51, + UNW_MIPS_F20 = 52, + UNW_MIPS_F21 = 53, + UNW_MIPS_F22 = 54, + UNW_MIPS_F23 = 55, + UNW_MIPS_F24 = 56, + UNW_MIPS_F25 = 57, + UNW_MIPS_F26 = 58, + UNW_MIPS_F27 = 59, + UNW_MIPS_F28 = 60, + UNW_MIPS_F29 = 61, + UNW_MIPS_F30 = 62, + UNW_MIPS_F31 = 63, UNW_MIPS_HI = 64, UNW_MIPS_LO = 65, }; |

