summaryrefslogtreecommitdiff
path: root/test/MC/PowerPC/ppc64-encoding.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/PowerPC/ppc64-encoding.s')
-rw-r--r--test/MC/PowerPC/ppc64-encoding.s137
1 files changed, 104 insertions, 33 deletions
diff --git a/test/MC/PowerPC/ppc64-encoding.s b/test/MC/PowerPC/ppc64-encoding.s
index dda796063849a..d82d86fd0102e 100644
--- a/test/MC/PowerPC/ppc64-encoding.s
+++ b/test/MC/PowerPC/ppc64-encoding.s
@@ -8,40 +8,73 @@
# CHECK: b target # encoding: [0b010010AA,A,A,0bAAAAAA00]
# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
b target
-# FIXME: ba target
+# CHECK: ba target # encoding: [0b010010AA,A,A,0bAAAAAA10]
+# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
+ ba target
# CHECK: bl target # encoding: [0b010010AA,A,A,0bAAAAAA01]
# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
bl target
-# FIXME: bla target
-
-# FIXME: bc 4, 10, target
-# FIXME: bca 4, 10, target
-# FIXME: bcl 4, 10, target
-# FIXME: bcla 4, 10, target
-
-# FIXME: bclr 4, 10, 3
-# FIXME: bclrl 4, 10, 3
-# FIXME: bcctr 4, 10, 3
-# FIXME: bcctrl 4, 10, 3
+# CHECK: bla target # encoding: [0b010010AA,A,A,0bAAAAAA11]
+# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
+ bla target
+
+# CHECK: bc 4, 10, target # encoding: [0x40,0x8a,A,0bAAAAAA00]
+# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
+ bc 4, 10, target
+# CHECK: bca 4, 10, target # encoding: [0x40,0x8a,A,0bAAAAAA10]
+# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
+ bca 4, 10, target
+# CHECK: bcl 4, 10, target # encoding: [0x40,0x8a,A,0bAAAAAA01]
+# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
+ bcl 4, 10, target
+# CHECK: bcla 4, 10, target # encoding: [0x40,0x8a,A,0bAAAAAA11]
+# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
+ bcla 4, 10, target
+
+# CHECK: bclr 4, 10, 3 # encoding: [0x4c,0x8a,0x18,0x20]
+ bclr 4, 10, 3
+# CHECK: bclr 4, 10, 0 # encoding: [0x4c,0x8a,0x00,0x20]
+ bclr 4, 10
+# CHECK: bclrl 4, 10, 3 # encoding: [0x4c,0x8a,0x18,0x21]
+ bclrl 4, 10, 3
+# CHECK: bclrl 4, 10, 0 # encoding: [0x4c,0x8a,0x00,0x21]
+ bclrl 4, 10
+# CHECK: bcctr 4, 10, 3 # encoding: [0x4c,0x8a,0x1c,0x20]
+ bcctr 4, 10, 3
+# CHECK: bcctr 4, 10, 0 # encoding: [0x4c,0x8a,0x04,0x20]
+ bcctr 4, 10
+# CHECK: bcctrl 4, 10, 3 # encoding: [0x4c,0x8a,0x1c,0x21]
+ bcctrl 4, 10, 3
+# CHECK: bcctrl 4, 10, 0 # encoding: [0x4c,0x8a,0x04,0x21]
+ bcctrl 4, 10
# Condition register instructions
-# FIXME: crand 2, 3, 4
-# FIXME: crnand 2, 3, 4
+# CHECK: crand 2, 3, 4 # encoding: [0x4c,0x43,0x22,0x02]
+ crand 2, 3, 4
+# CHECK: crnand 2, 3, 4 # encoding: [0x4c,0x43,0x21,0xc2]
+ crnand 2, 3, 4
# CHECK: cror 2, 3, 4 # encoding: [0x4c,0x43,0x23,0x82]
cror 2, 3, 4
-# FIXME: crxor 2, 3, 4
-# FIXME: crnor 2, 3, 4
+# CHECK: crxor 2, 3, 4 # encoding: [0x4c,0x43,0x21,0x82]
+ crxor 2, 3, 4
+# CHECK: crnor 2, 3, 4 # encoding: [0x4c,0x43,0x20,0x42]
+ crnor 2, 3, 4
# CHECK: creqv 2, 3, 4 # encoding: [0x4c,0x43,0x22,0x42]
creqv 2, 3, 4
-# FIXME: crandc 2, 3, 4
-# FIXME: crorc 2, 3, 4
+# CHECK: crandc 2, 3, 4 # encoding: [0x4c,0x43,0x21,0x02]
+ crandc 2, 3, 4
+# CHECK: crorc 2, 3, 4 # encoding: [0x4c,0x43,0x23,0x42]
+ crorc 2, 3, 4
# CHECK: mcrf 2, 3 # encoding: [0x4d,0x0c,0x00,0x00]
mcrf 2, 3
# System call instruction
-# FIXME: sc 1
+# CHECK: sc 1 # encoding: [0x44,0x00,0x00,0x22]
+ sc 1
+# CHECK: sc 0 # encoding: [0x44,0x00,0x00,0x02]
+ sc
# Fixed-point facility
@@ -144,7 +177,12 @@
# CHECK: stdbrx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x28]
stdbrx 2, 3, 4
-# FIXME: Fixed-point load and store multiple instructions
+# Fixed-point load and store multiple instructions
+
+# CHECK: lmw 2, 128(1) # encoding: [0xb8,0x41,0x00,0x80]
+ lmw 2, 128(1)
+# CHECK: stmw 2, 128(1) # encoding: [0xbc,0x41,0x00,0x80]
+ stmw 2, 128(1)
# FIXME: Fixed-point move assist instructions
@@ -306,9 +344,36 @@
# FIXME: divdeuo 2, 3, 4
# FIXME: divdeuo. 2, 3, 4
-# FIXME: Fixed-point compare instructions
-
-# FIXME: Fixed-point trap instructions
+# Fixed-point compare instructions
+
+# CHECK: cmpdi 2, 3, 128 # encoding: [0x2d,0x23,0x00,0x80]
+ cmpi 2, 1, 3, 128
+# CHECK: cmpd 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x00]
+ cmp 2, 1, 3, 4
+# CHECK: cmpldi 2, 3, 128 # encoding: [0x29,0x23,0x00,0x80]
+ cmpli 2, 1, 3, 128
+# CHECK: cmpld 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x40]
+ cmpl 2, 1, 3, 4
+
+# CHECK: cmpwi 2, 3, 128 # encoding: [0x2d,0x03,0x00,0x80]
+ cmpi 2, 0, 3, 128
+# CHECK: cmpw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x00]
+ cmp 2, 0, 3, 4
+# CHECK: cmplwi 2, 3, 128 # encoding: [0x29,0x03,0x00,0x80]
+ cmpli 2, 0, 3, 128
+# CHECK: cmplw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x40]
+ cmpl 2, 0, 3, 4
+
+# Fixed-point trap instructions
+
+# CHECK: twi 2, 3, 4 # encoding: [0x0c,0x43,0x00,0x04]
+ twi 2, 3, 4
+# CHECK: tw 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x08]
+ tw 2, 3, 4
+# CHECK: tdi 2, 3, 4 # encoding: [0x08,0x43,0x00,0x04]
+ tdi 2, 3, 4
+# CHECK: td 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x88]
+ td 2, 3, 4
# Fixed-point select
@@ -417,14 +482,18 @@
rldicr 2, 3, 4, 5
# CHECK: rldicr. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x45]
rldicr. 2, 3, 4, 5
-# FIXME: rldic 2, 3, 4, 5
-# FIXME: rldic. 2, 3, 4, 5
+# CHECK: rldic 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x48]
+ rldic 2, 3, 4, 5
+# CHECK: rldic. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x49]
+ rldic. 2, 3, 4, 5
# CHECK: rldcl 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x50]
rldcl 2, 3, 4, 5
# CHECK: rldcl. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x51]
rldcl. 2, 3, 4, 5
-# FIXME: rldcr 2, 3, 4, 5
-# FIXME: rldcr. 2, 3, 4, 5
+# CHECK: rldcr 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x52]
+ rldcr 2, 3, 4, 5
+# CHECK: rldcr. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x53]
+ rldcr. 2, 3, 4, 5
# CHECK: rldimi 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4c]
rldimi 2, 3, 4, 5
# CHECK: rldimi. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4d]
@@ -467,14 +536,16 @@
# Move to/from system register instructions
-# FIXME: mtspr 256, 2
-# FIXME: mfspr 2, 256
-# CHECK: mtcrf 16, 2 # encoding: [0x7c,0x41,0x01,0x20]
- mtcrf 16, 2
+# CHECK: mtspr 600, 2 # encoding: [0x7c,0x58,0x93,0xa6]
+ mtspr 600, 2
+# CHECK: mfspr 2, 600 # encoding: [0x7c,0x58,0x92,0xa6]
+ mfspr 2, 600
+# CHECK: mtcrf 123, 2 # encoding: [0x7c,0x47,0xb1,0x20]
+ mtcrf 123, 2
# CHECK: mfcr 2 # encoding: [0x7c,0x40,0x00,0x26]
mfcr 2
-# FIXME: mtocrf 16, 2
+# CHECK: mtocrf 16, 2 # encoding: [0x7c,0x51,0x01,0x20]
+ mtocrf 16, 2
# CHECK: mfocrf 16, 8 # encoding: [0x7e,0x10,0x80,0x26]
mfocrf 16, 8
-# FIXME: mcrxr 2