Fix condition detection in EmulateInstructionARM
authorTamas Berghammer <tberghammer@google.com>
Fri, 24 Apr 2015 12:13:44 +0000 (12:13 +0000)
committerTamas Berghammer <tberghammer@google.com>
Fri, 24 Apr 2015 12:13:44 +0000 (12:13 +0000)
The condition detection code is calculating the result of the condition
based on the first 3 bit of the condition and then negate it if the LSB
of the condition is set. It works for the normal conditions but 0b1110
and 0b1111 are special as both of them should evaluate to true
independently the value of CPSR. This CL removes the negating logic from
those cases.

Differential revision: http://reviews.llvm.org/D9219

llvm-svn: 235715

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

index 7761946..fc95230 100644 (file)
@@ -13036,8 +13036,7 @@ EmulateInstructionARM::ConditionPassed (const uint32_t opcode, bool *is_conditio
         // opcodes different meanings, but always means execution happens.
         if (is_conditional)
             *is_conditional = false;
-        result = true; 
-        break;
+        return true;
     }
 
     if (cond & 1)