Fix write register context in EmulateInstructionARM::EmulateMOVRdRm

llvm-svn: 238431
This commit is contained in:
Tamas Berghammer 2015-05-28 15:09:45 +00:00
parent 3c007259a4
commit 034980681d
1 changed files with 4 additions and 1 deletions

View File

@ -815,7 +815,10 @@ EmulateInstructionARM::EmulateMOVRdRm (const uint32_t opcode, const ARMEncoding
// The context specifies that Rm is to be moved into Rd.
EmulateInstruction::Context context;
context.type = EmulateInstruction::eContextRegisterPlusOffset;
if (Rd == 13)
context.type = EmulateInstruction::eContextAdjustStackPointer;
else
context.type = EmulateInstruction::eContextRegisterPlusOffset;
RegisterInfo dwarf_reg;
GetRegisterInfo (eRegisterKindDWARF, dwarf_r0 + Rm, dwarf_reg);
context.SetRegisterPlusOffset (dwarf_reg, 0);