aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilviu Baranga <silviu.baranga@arm.com>2012-04-18 13:02:55 +0000
committerSilviu Baranga <silviu.baranga@arm.com>2012-04-18 13:02:55 +0000
commite546c4c9c3004274c8e275e8303ca078b794bf28 (patch)
tree003a1f23a926f767cd828a24b5f4c8ead7a4b3bb
parent9e71231309e8924b89aa94ca86cae883db1d2916 (diff)
Fixed decoding for the ARM cdp2 instruction. The restriction on the coprocessor number was removed for this instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155000 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMInstrInfo.td7
-rw-r--r--test/MC/Disassembler/ARM/arm-tests.txt3
-rw-r--r--utils/TableGen/EDEmitter.cpp1
3 files changed, 10 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td
index 9d005eeb81..3361ad472a 100644
--- a/lib/Target/ARM/ARMInstrInfo.td
+++ b/lib/Target/ARM/ARMInstrInfo.td
@@ -908,6 +908,11 @@ def p_imm : Operand<i32> {
let DecoderMethod = "DecodeCoprocessor";
}
+def pf_imm : Operand<i32> {
+ let PrintMethod = "printPImmediate";
+ let ParserMatchClass = CoprocNumAsmOperand;
+}
+
def CoprocRegAsmOperand : AsmOperandClass {
let Name = "CoprocReg";
let ParserMethod = "parseCoprocRegOperand";
@@ -4306,7 +4311,7 @@ def CDP : ABI<0b1110, (outs), (ins p_imm:$cop, imm0_15:$opc1,
let Inst{23-20} = opc1;
}
-def CDP2 : ABXI<0b1110, (outs), (ins p_imm:$cop, imm0_15:$opc1,
+def CDP2 : ABXI<0b1110, (outs), (ins pf_imm:$cop, imm0_15:$opc1,
c_imm:$CRd, c_imm:$CRn, c_imm:$CRm, imm0_7:$opc2),
NoItinerary, "cdp2\t$cop, $opc1, $CRd, $CRn, $CRm, $opc2",
[(int_arm_cdp2 imm:$cop, imm:$opc1, imm:$CRd, imm:$CRn,
diff --git a/test/MC/Disassembler/ARM/arm-tests.txt b/test/MC/Disassembler/ARM/arm-tests.txt
index ce1446b02b..471076a19b 100644
--- a/test/MC/Disassembler/ARM/arm-tests.txt
+++ b/test/MC/Disassembler/ARM/arm-tests.txt
@@ -321,3 +321,6 @@
# CHECK: ldmgt sp!, {r9}
0x00 0x02 0xbd 0xc8
+# CHECK: cdp2 p10, #0, c6, c12, c0, #7
+0xe0 0x6a 0x0c 0xfe
+
diff --git a/utils/TableGen/EDEmitter.cpp b/utils/TableGen/EDEmitter.cpp
index 3809a4576a..fe484ca8cf 100644
--- a/utils/TableGen/EDEmitter.cpp
+++ b/utils/TableGen/EDEmitter.cpp
@@ -594,6 +594,7 @@ static int ARMFlagFromOpName(LiteralConstantEmitter *type,
IMM("jtblock_operand");
IMM("nohash_imm");
IMM("p_imm");
+ IMM("pf_imm");
IMM("c_imm");
IMM("coproc_option_imm");
IMM("imod_op");