diff options
| author | Tamas Berghammer <tberghammer@google.com> | 2015-05-28 10:38:32 +0000 |
|---|---|---|
| committer | Tamas Berghammer <tberghammer@google.com> | 2015-05-28 10:38:32 +0000 |
| commit | 64d807e95d8d9969132f67f70e5ffb1acf9aedf9 (patch) | |
| tree | 7ffa347e95d018978ca1c0d6e1fc6ff3769fe04b | |
| parent | 64c701b3f7265fe731e095a18792587ee87e5908 (diff) | |
| download | bcm5719-llvm-64d807e95d8d9969132f67f70e5ffb1acf9aedf9.tar.gz bcm5719-llvm-64d807e95d8d9969132f67f70e5ffb1acf9aedf9.zip | |
Fix write register context in EmulateInstructionARM::EmulateADDRdSPImm
llvm-svn: 238410
| -rw-r--r-- | lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index 9634664b485..d4dfe59381b 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -660,9 +660,12 @@ EmulateInstructionARM::EmulateADDRdSPImm (const uint32_t opcode, const ARMEncodi } addr_t sp_offset = imm32; addr_t addr = sp + sp_offset; // a pointer to the stack area - + EmulateInstruction::Context context; - context.type = eContextSetFramePointer; + if (Rd == GetFramePointerRegisterNumber()) + context.type = eContextSetFramePointer; + else + context.type = EmulateInstruction::eContextRegisterPlusOffset; RegisterInfo sp_reg; GetRegisterInfo (eRegisterKindDWARF, dwarf_sp, sp_reg); context.SetRegisterPlusOffset (sp_reg, sp_offset); |

