[Lldb-commits] [lldb] r126904 - /lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Caroline Tice ctice at apple.com
Wed Mar 2 16:07:02 PST 2011


Author: ctice
Date: Wed Mar  2 18:07:02 2011
New Revision: 126904

URL: http://llvm.org/viewvc/llvm-project?rev=126904&view=rev
Log:

Fix bug where bitwise-AND was being used and it should have been bitwise-OR.


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=126904&r1=126903&r2=126904&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Wed Mar  2 18:07:02 2011
@@ -6325,7 +6325,7 @@
                   
                 // t == UInt(Rt); imm32 = ZeroExtend(imm4H:imm4L, 32); add = (U == ’1’);
                 t = Bits32 (opcode, 15, 12);
-                imm32 = (imm4H << 4) & imm4L;
+                imm32 = (imm4H << 4) | imm4L;
                 add = BitIsSet (opcode, 23);
                   
                 // if t == 15 then UNPREDICTABLE;                  
@@ -6645,7 +6645,7 @@
             
                 uint32_t imm4H = Bits32 (opcode, 11, 8);
                 uint32_t imm4L = Bits32 (opcode, 3, 0);
-                imm32 = (imm4H << 4) & imm4L;
+                imm32 = (imm4H << 4) | imm4L;
                   
                 // index = (P == ’1’);	add = (U == ’1’);	wback = (P == ’0’) || (W == ’1’); 
                 index = BitIsSet (opcode, 24);
@@ -6757,7 +6757,7 @@
                 t = Bits32 (opcode, 15, 12);
                 uint32_t imm4H = Bits32 (opcode, 11, 8);
                 uint32_t imm4L = Bits32 (opcode, 3, 0);
-                imm32 = (imm4H << 4) & imm4L;
+                imm32 = (imm4H << 4) | imm4L;
                 add = BitIsSet (opcode, 23);
                   
                 // if t == 15 then UNPREDICTABLE;
@@ -7051,7 +7051,7 @@
                 n = Bits32 (opcode, 19, 16);
                 uint32_t imm4H = Bits32 (opcode, 11,8);
                 uint32_t imm4L = Bits32 (opcode, 3, 0);
-                imm32 = (imm4H << 4) & imm4L;
+                imm32 = (imm4H << 4) | imm4L;
                   
                 // index = (P == ’1’);	add = (U == ’1’);	wback = (P == ’0’) || (W == ’1’); 
                 index = BitIsSet (opcode, 24);
@@ -7177,7 +7177,7 @@
                 t = Bits32 (opcode, 15, 12);
                 uint32_t imm4H = Bits32 (opcode, 11, 8);
                 uint32_t imm4L = Bits32 (opcode, 3, 0);
-                imm32 = (imm4H << 4) & imm4L;
+                imm32 = (imm4H << 4) | imm4L;
                 add = BitIsSet (opcode, 23);
                   
                 // if t == 15 then UNPREDICTABLE;





More information about the lldb-commits mailing list