diff options
author | Tamas Berghammer <tberghammer@google.com> | 2015-12-21 12:06:36 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2015-12-21 12:06:36 +0000 |
commit | fde63cad6b7c179948377bf07e54f5809b0a832a (patch) | |
tree | 3ee428e8a4b32643a432b9ce4cda54e54e6512b9 /lldb | |
parent | f97fdae4d0d0192db59531fd9948339153be27cb (diff) | |
download | bcm5719-llvm-fde63cad6b7c179948377bf07e54f5809b0a832a.tar.gz bcm5719-llvm-fde63cad6b7c179948377bf07e54f5809b0a832a.zip |
Fix emulation of the thumb str instruction
llvm-svn: 256147
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index 6ae40a0fece..d646d4d4754 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -4781,7 +4781,11 @@ EmulateInstructionARM::EmulateSTRThumb (const uint32_t opcode, const ARMEncoding address = base_address; EmulateInstruction::Context context; - context.type = eContextRegisterStore; + if (n == 13) + context.type = eContextPushRegisterOnStack; + else + context.type = eContextRegisterStore; + RegisterInfo base_reg; GetRegisterInfo (eRegisterKindDWARF, dwarf_r0 + n, base_reg); @@ -4809,8 +4813,12 @@ EmulateInstructionARM::EmulateSTRThumb (const uint32_t opcode, const ARMEncoding // if wback then R[n] = offset_addr; if (wback) { - context.type = eContextRegisterLoad; + if (n == 13) + context.type = eContextAdjustStackPointer; + else + context.type = eContextAdjustBaseRegister; context.SetAddress (offset_addr); + if (!WriteRegisterUnsigned (context, eRegisterKindDWARF, dwarf_r0 + n, offset_addr)) return false; } |