[libunwind] r339849 - [libunwind][mips] Guard accumulator registers
Stefan Maksimovic via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 16 01:49:50 PDT 2018
Author: smaksimovic
Date: Thu Aug 16 01:49:50 2018
New Revision: 339849
URL: http://llvm.org/viewvc/llvm-project?rev=339849&view=rev
Log:
[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
Modified:
libunwind/trunk/src/Registers.hpp
Modified: libunwind/trunk/src/Registers.hpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/Registers.hpp?rev=339849&r1=339848&r2=339849&view=diff
==============================================================================
--- libunwind/trunk/src/Registers.hpp (original)
+++ libunwind/trunk/src/Registers.hpp Thu Aug 16 01:49:50 2018
@@ -2759,10 +2759,12 @@ inline bool Registers_mips_o32::validReg
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::valid
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;
}
More information about the cfe-commits
mailing list