From: Tamas Berghammer Date: Fri, 24 Apr 2015 12:13:38 +0000 (+0000) Subject: Fix write register context for arm "add , sp, #imm" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04f7144907affa305d4fc2deb406c473451a7228;p=platform%2Fupstream%2Fllvm.git Fix write register context for arm "add , sp, #imm" Differential revision: http://reviews.llvm.org/D9213 llvm-svn: 235713 --- diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index 3996b24..965c02a 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -1357,7 +1357,11 @@ EmulateInstructionARM::EmulateADDSPImm (const uint32_t opcode, const ARMEncoding addr_t addr = sp + sp_offset; // the adjusted stack pointer value EmulateInstruction::Context context; - context.type = EmulateInstruction::eContextAdjustStackPointer; + if (d == 13) + context.type = EmulateInstruction::eContextAdjustStackPointer; + else + context.type = EmulateInstruction::eContextRegisterPlusOffset; + RegisterInfo sp_reg; GetRegisterInfo (eRegisterKindDWARF, dwarf_sp, sp_reg); context.SetRegisterPlusOffset (sp_reg, sp_offset);