Fix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShift
authorRaphael Isemann <teemperor@gmail.com>
Sat, 27 Apr 2019 18:15:35 +0000 (18:15 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Sat, 27 Apr 2019 18:15:35 +0000 (18:15 +0000)
Summary:
As reported in LLVM bug 41487, the check in this function is wrong and should be
the same as the described check in the comment (which is correctly copied from the
ARM ISA reference).

Reviewers: #lldb, davide, JDevlieghere

Reviewed By: #lldb, davide, JDevlieghere

Subscribers: davide, javed.absar, kristof.beyls, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D60654

llvm-svn: 359387

lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

index 46252b9..130adbd 100644 (file)
@@ -10150,7 +10150,7 @@ bool EmulateInstructionARM::EmulateADDRegShift(const uint32_t opcode,
       shift_t = DecodeRegShift(Bits32(opcode, 6, 5));
 
       // if d == 15 || n == 15 || m == 15 || s == 15 then UNPREDICTABLE;
-      if ((d == 15) || (m == 15) || (m == 15) || (s == 15))
+      if ((d == 15) || (n == 15) || (m == 15) || (s == 15))
         return false;
       break;