[PATCH] D50244: [libunwind][mips] Guard accumulator registers
    Stefan Maksimovic via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Aug  3 05:15:17 PDT 2018
    
    
  
smaksimovic created this revision.
smaksimovic added a reviewer: atanasyan.
Herald added subscribers: chrib, arichardson, sdardis.
Mipsr6 does not possess HI and LO accumulator registers, adjust validRegister functions to respect that.
https://reviews.llvm.org/D50244
Files:
  src/Registers.hpp
Index: src/Registers.hpp
===================================================================
--- src/Registers.hpp
+++ src/Registers.hpp
@@ -2759,10 +2759,12 @@
     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 @@
     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;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50244.158983.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180803/dd802303/attachment.bin>
    
    
More information about the llvm-commits
mailing list