[Lldb-commits] [lldb] r235715 - Fix condition detection in EmulateInstructionARM

Tamas Berghammer tberghammer at google.com
Fri Apr 24 05:13:44 PDT 2015


Author: tberghammer
Date: Fri Apr 24 07:13:44 2015
New Revision: 235715

URL: http://llvm.org/viewvc/llvm-project?rev=235715&view=rev
Log:
Fix condition detection in EmulateInstructionARM

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

Modified:
    lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Modified: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp?rev=235715&r1=235714&r2=235715&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Fri Apr 24 07:13:44 2015
@@ -13036,8 +13036,7 @@ EmulateInstructionARM::ConditionPassed (
         // opcodes different meanings, but always means execution happens.
         if (is_conditional)
             *is_conditional = false;
-        result = true; 
-        break;
+        return true;
     }
 
     if (cond & 1)





More information about the lldb-commits mailing list