diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-02-25 00:23:25 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-02-25 00:23:25 +0000 |
commit | 699ac0e9678324fce530aad636f9e4589cd825b8 (patch) | |
tree | c7ca923f88c7e0a4a7de010531b8748c0169c396 | |
parent | 0e066c0238a7b93759476965c29ae3054d100f84 (diff) | |
download | bcm5719-llvm-699ac0e9678324fce530aad636f9e4589cd825b8.tar.gz bcm5719-llvm-699ac0e9678324fce530aad636f9e4589cd825b8.zip |
Add emulation for Encoding A1 of A8.6.97 MOV (register).
llvm-svn: 126456
-rw-r--r-- | lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index 434db6192e9..59fd6a94e99 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -632,6 +632,15 @@ EmulateInstructionARM::EmulateMOVRdRm (ARMEncoding encoding) if (!setflags && (Rd == 15 || Rm == 15 || (Rd == 13 && Rm == 13))) return false; break; + case eEncodingA1: + Rd = Bits32(opcode, 15, 12); + Rm = Bits32(opcode, 3, 0); + setflags = BitIsSet(opcode, 20); + // if Rd == '1111' && S == '1' then SEE SUBS PC, LR and related instructions; + // TODO: Emulate SUBS PC, LR and related instructions. + if (Rd == 15 && setflags) + return false; + break; default: return false; } @@ -7190,6 +7199,8 @@ EmulateInstructionARM::GetARMOpcodeForInstruction (const uint32_t opcode) { 0x0ff0f010, 0x01100000, ARMvAll, eEncodingA1, eSize32, &EmulateInstructionARM::EmulateTSTReg, "tst<c> <Rn>, <Rm> {,<shift>}"}, + // mov (register) + { 0x0fef0ff0, 0x01a00000, ARMvAll, eEncodingA1, eSize32, &EmulateInstructionARM::EmulateMOVRdRm, "mov{s}<c> <Rd>, <Rm>"}, // mvn (immediate) { 0x0fef0000, 0x03e00000, ARMvAll, eEncodingA1, eSize32, &EmulateInstructionARM::EmulateMVNImm, "mvn{s}<c> <Rd>, #<const>"}, // mvn (register) |