[llvm] r179847 - ARM: permit "sp" in ARM variants of MOVW/MOVT instructions
Tim Northover
Tim.Northover at arm.com
Fri Apr 19 02:58:09 PDT 2013
Author: tnorthover
Date: Fri Apr 19 04:58:09 2013
New Revision: 179847
URL: http://llvm.org/viewvc/llvm-project?rev=179847&view=rev
Log:
ARM: permit "sp" in ARM variants of MOVW/MOVT instructions
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/trunk/test/MC/Disassembler/ARM/basic-arm-instructions.txt
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=179847&r1=179846&r2=179847&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Fri Apr 19 04:58:09 2013
@@ -1998,9 +1998,10 @@ static DecodeStatus DecodeArmMOVTWInstru
imm |= (fieldFromInstruction(Insn, 16, 4) << 12);
if (Inst.getOpcode() == ARM::MOVTi16)
- if (!Check(S, DecoderGPRRegisterClass(Inst, Rd, Address, Decoder)))
+ if (!Check(S, DecodeGPRnopcRegisterClass(Inst, Rd, Address, Decoder)))
return MCDisassembler::Fail;
- if (!Check(S, DecoderGPRRegisterClass(Inst, Rd, Address, Decoder)))
+
+ if (!Check(S, DecodeGPRnopcRegisterClass(Inst, Rd, Address, Decoder)))
return MCDisassembler::Fail;
if (!tryAddingSymbolicOperand(Address, imm, false, 4, Inst, Decoder))
Modified: llvm/trunk/test/MC/Disassembler/ARM/basic-arm-instructions.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/basic-arm-instructions.txt?rev=179847&r1=179846&r2=179847&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/basic-arm-instructions.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/basic-arm-instructions.txt Fri Apr 19 04:58:09 2013
@@ -707,8 +707,10 @@
# CHECK: mov r3, #7
# CHECK: mov r4, #4080
# CHECK: mov r5, #16711680
+# CHECK: mov sp, #35
# CHECK: movw r6, #65535
# CHECK: movw r9, #65535
+# CHECK: movw sp, #1193
# CHECK: movs r3, #7
# CHECK: moveq r4, #4080
# CHECK: movseq r5, #16711680
@@ -716,8 +718,10 @@
0x07 0x30 0xa0 0xe3
0xff 0x4e 0xa0 0xe3
0xff 0x58 0xa0 0xe3
+0x23 0xd0 0xa0 0xe3
0xff 0x6f 0x0f 0xe3
0xff 0x9f 0x0f 0xe3
+0xa9 0xd4 0x00 0xe3
0x07 0x30 0xb0 0xe3
0xff 0x4e 0xa0 0x03
0xff 0x58 0xb0 0x03
@@ -740,10 +744,12 @@
#------------------------------------------------------------------------------
# CHECK: movt r3, #7
# CHECK: movt r6, #65535
+# CHECK: movt sp, #3397
# CHECK: movteq r4, #4080
0x07 0x30 0x40 0xe3
0xff 0x6f 0x4f 0xe3
+0x45 0xdd 0x40 0xe3
0xf0 0x4f 0x40 0x03
More information about the llvm-commits
mailing list