[Lldb-commits] [lldb] r124144 - /lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp
Johnny Chen
johnny.chen at apple.com
Mon Jan 24 12:38:45 PST 2011
Author: johnny
Date: Mon Jan 24 14:38:45 2011
New Revision: 124144
URL: http://llvm.org/viewvc/llvm-project?rev=124144&view=rev
Log:
Add Encoding T1 of the PUSH instructions to the g_arm_opcodes table.
Modified:
lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp
Modified: lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp?rev=124144&r1=124143&r2=124144&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/EmulateInstructionARM.cpp Mon Jan 24 14:38:45 2011
@@ -108,8 +108,17 @@
if (!success)
return false;
uint32_t registers = 0;
- uint32_t t; // UInt(Rt)
+ uint32_t t; // t = UInt(Rt)
switch (encoding) {
+ case eEncodingT1:
+ registers = EmulateInstruction::UnsignedBits (opcode, 7, 0);
+ // The M bit represents LR.
+ if (EmulateInstruction::UnsignedBits (opcode, 8, 8))
+ registers |= 0x000eu;
+ // if BitCount(registers) < 1 then UNPREDICTABLE;
+ if (BitCount(registers) < 1)
+ return false;
+ break;
case eEncodingT2:
// Ignore bits 15 & 13.
registers = EmulateInstruction::UnsignedBits (opcode, 15, 0) & ~0xa000;
@@ -179,6 +188,8 @@
static ARMOpcode g_arm_opcodes[] =
{
+ { 0x0000fe00, 0x0000b400, ARMvAll, eEncodingT1, eSize16, EmulateARMPushEncoding,
+ "PUSH<c> <registers>" },
{ 0xffff0000, 0xe8ad0000, ARMv6T2|ARMv7, eEncodingT2, eSize32, EmulateARMPushEncoding,
"PUSH<c>.W <registers> ; <registers> contains more than one register" },
{ 0xffff0fff, 0xf84d0d04, ARMv6T2|ARMv7, eEncodingT3, eSize32, EmulateARMPushEncoding,
More information about the lldb-commits
mailing list