aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-01-26 13:28:14 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-01-26 13:28:14 +0000
commit1b10d5be40313b4e246e85cf375dfa3452ab306b (patch)
tree169ac7a41414d243da97f93fdd938bb5486d2eb9
parent37f87c7aa914fba1362bb187ce5a386abfe94e39 (diff)
fix the encoding and add testcases for ARM nop, yield, wfe and wfi instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124288 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMInstrThumb2.td1
-rw-r--r--test/MC/ARM/arm_instructions.s12
-rw-r--r--test/MC/ARM/thumb.s11
-rw-r--r--test/MC/ARM/thumb2.s13
4 files changed, 37 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td
index 55802bdc49..a87f09e442 100644
--- a/lib/Target/ARM/ARMInstrThumb2.td
+++ b/lib/Target/ARM/ARMInstrThumb2.td
@@ -3157,6 +3157,7 @@ class T2I_hint<bits<8> op7_0, string opc, string asm>
: T2I<(outs), (ins), NoItinerary, opc, asm,
[/* For disassembly only; pattern left blank */]> {
let Inst{31-20} = 0xf3a;
+ let Inst{19-16} = 0b1111;
let Inst{15-14} = 0b10;
let Inst{12} = 0;
let Inst{10-8} = 0b000;
diff --git a/test/MC/ARM/arm_instructions.s b/test/MC/ARM/arm_instructions.s
index 40e3342ba5..4df8270b7d 100644
--- a/test/MC/ARM/arm_instructions.s
+++ b/test/MC/ARM/arm_instructions.s
@@ -176,3 +176,15 @@
@ CHECK: qdsub r1, r2, r3 @ encoding: [0x52,0x10,0x63,0xe1]
qdsub r1, r2, r3
+
+@ CHECK: wfe @ encoding: [0x02,0xf0,0x20,0xe3]
+ wfe
+
+@ CHECK: wfi @ encoding: [0x03,0xf0,0x20,0xe3]
+ wfi
+
+@ CHECK: yield @ encoding: [0x01,0xf0,0x20,0xe3]
+ yield
+
+@ CHECK: nop @ encoding: [0x00,0xf0,0x20,0xe3]
+ nop
diff --git a/test/MC/ARM/thumb.s b/test/MC/ARM/thumb.s
index 21052576c1..5d284c31fe 100644
--- a/test/MC/ARM/thumb.s
+++ b/test/MC/ARM/thumb.s
@@ -54,3 +54,14 @@
@ CHECK: cdp p7, #1, c1, c1, c1, #4 @ encoding: [0x11,0xee,0x81,0x17]
cdp p7, #1, c1, c1, c1, #4
+@ CHECK: nop @ encoding: [0x00,0xbf]
+ nop
+
+@ CHECK: yield @ encoding: [0x10,0xbf]
+ yield
+
+@ CHECK: wfe @ encoding: [0x20,0xbf]
+ wfe
+
+@ CHECK: wfi @ encoding: [0x30,0xbf]
+ wfi
diff --git a/test/MC/ARM/thumb2.s b/test/MC/ARM/thumb2.s
index 2fb0369e02..b815ad981e 100644
--- a/test/MC/ARM/thumb2.s
+++ b/test/MC/ARM/thumb2.s
@@ -214,3 +214,16 @@
@ CHECK: qdsub r1, r2, r3 @ encoding: [0x83,0xfa,0xb2,0xf1]
qdsub r1, r2, r3
+
+@ CHECK: nop.w @ encoding: [0xaf,0xf3,0x00,0x80]
+ nop.w
+
+@ CHECK: yield.w @ encoding: [0xaf,0xf3,0x01,0x80]
+ yield.w
+
+@ CHECK: wfe.w @ encoding: [0xaf,0xf3,0x02,0x80]
+ wfe.w
+
+@ CHECK: wfi.w @ encoding: [0xaf,0xf3,0x03,0x80]
+ wfi.w
+