summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-07-29 15:15:42 +0000
committerTamas Berghammer <tberghammer@google.com>2015-07-29 15:15:42 +0000
commite3a182c05242b64a59ac538bede580295d7eb9da (patch)
treeef0e64e412c307da5481bd35b1aec1ab80e22d9e
parente98e3f63252554bbdc1b89181fbe4ab0b1b43675 (diff)
downloadbcm5719-llvm-e3a182c05242b64a59ac538bede580295d7eb9da.tar.gz
bcm5719-llvm-e3a182c05242b64a59ac538bede580295d7eb9da.zip
Fix read/write context in EmulateInstructionARM strd/ldrd
llvm-svn: 243521
-rw-r--r--lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
index c6fc1288a49..c8fc9f86c7d 100644
--- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -10303,7 +10303,10 @@ EmulateInstructionARM::EmulateLDRDImmediate (const uint32_t opcode, const ARMEnc
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::EmulateLDRDRegister (const uint32_t opcode, const ARMEnco
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 (const uint32_t opcode, const ARMEncoding
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 (const uint32_t opcode, const ARMEncoding
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);
OpenPOWER on IntegriCloud