[Lldb-commits] [lldb] r243521 - Fix read/write context in EmulateInstructionARM strd/ldrd

Tamas Berghammer tberghammer at google.com
Wed Jul 29 08:15:42 PDT 2015


Author: tberghammer
Date: Wed Jul 29 10:15:42 2015
New Revision: 243521

URL: http://llvm.org/viewvc/llvm-project?rev=243521&view=rev
Log:
Fix read/write context in EmulateInstructionARM strd/ldrd

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=243521&r1=243520&r2=243521&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Wed Jul 29 10:15:42 2015
@@ -10303,7 +10303,10 @@ EmulateInstructionARM::EmulateLDRDImmedi
         GetRegisterInfo (eRegisterKindDWARF, dwarf_r0 + n, base_reg);
                   
         EmulateInstruction::Context context;
-        context.type = eContextRegisterLoad;
+        if (n == 13)
+            context.type = eContextPopRegisterOffStack;
+        else
+            context.type = eContextRegisterLoad;
         context.SetRegisterPlusOffset (base_reg, address - Rn);
                   
         const uint32_t addr_byte_size = GetAddressByteSize();
@@ -10430,7 +10433,10 @@ EmulateInstructionARM::EmulateLDRDRegist
             address = Rn;
                   
         EmulateInstruction::Context context;
-        context.type = eContextRegisterLoad;
+        if (n == 13)
+            context.type = eContextPopRegisterOffStack;
+        else
+            context.type = eContextRegisterLoad;
         context.SetRegisterPlusIndirectOffset (base_reg, offset_reg);
                   
         // R[t] = MemA[address,4];
@@ -10581,7 +10587,10 @@ EmulateInstructionARM::EmulateSTRDImm (c
             return false;
                   
         EmulateInstruction::Context context;
-        context.type = eContextRegisterStore;
+        if (n == 13)
+            context.type = eContextPushRegisterOnStack;
+        else
+            context.type = eContextRegisterStore;
         context.SetRegisterToRegisterPlusOffset (data_reg, base_reg, address - Rn);
                   
         const uint32_t addr_byte_size = GetAddressByteSize();
@@ -10713,7 +10722,11 @@ EmulateInstructionARM::EmulateSTRDReg (c
             return false;
                   
         EmulateInstruction::Context context;
-        context.type = eContextRegisterStore;
+        if (t == 13)
+            context.type = eContextPushRegisterOnStack;
+        else
+            context.type = eContextRegisterStore;
+        
         GetRegisterInfo (eRegisterKindDWARF, dwarf_r0 + t, data_reg);
         context.SetRegisterToRegisterPlusIndirectOffset (base_reg, offset_reg, data_reg);
                   





More information about the lldb-commits mailing list