diff options
author | Stefan Maksimovic <stefan.maksimovic@mips.com> | 2018-08-16 08:49:50 +0000 |
---|---|---|
committer | Stefan Maksimovic <stefan.maksimovic@mips.com> | 2018-08-16 08:49:50 +0000 |
commit | fe50950dac3acc25ef86ba11f1fa4b6e922ebbd4 (patch) | |
tree | 8121db76543abb2db9c8322862b1cd9e06ef0e1a | |
parent | 944677cd2811dde87aa4f3ba6809ff509f58cf67 (diff) | |
download | bcm5719-llvm-fe50950dac3acc25ef86ba11f1fa4b6e922ebbd4.tar.gz bcm5719-llvm-fe50950dac3acc25ef86ba11f1fa4b6e922ebbd4.zip |
[libunwind][mips] Guard accumulator registers
Mipsr6 does not possess HI and LO accumulator registers, adjust validRegister functions to respect that.
Differential Revision: https://reviews.llvm.org/D50244
llvm-svn: 339849
-rw-r--r-- | libunwind/src/Registers.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp index b20664a48de..63a50d42764 100644 --- a/libunwind/src/Registers.hpp +++ b/libunwind/src/Registers.hpp @@ -2759,10 +2759,12 @@ inline bool Registers_mips_o32::validRegister(int regNum) const { return false; if (regNum <= UNW_MIPS_R31) return true; +#if __mips_isa_rev != 6 if (regNum == UNW_MIPS_HI) return true; if (regNum == UNW_MIPS_LO) return true; +#endif #if defined(__mips_hard_float) && __mips_fpr == 32 if (regNum >= UNW_MIPS_F0 && regNum <= UNW_MIPS_F31) return true; @@ -3073,10 +3075,12 @@ inline bool Registers_mips_newabi::validRegister(int regNum) const { return false; if (regNum <= UNW_MIPS_R31) return true; +#if __mips_isa_rev != 6 if (regNum == UNW_MIPS_HI) return true; if (regNum == UNW_MIPS_LO) return true; +#endif // FIXME: Hard float, DSP accumulator registers, MSA registers return false; } |