aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/MC/PowerPC/ppc64-encoding-ext.s20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/MC/PowerPC/ppc64-encoding-ext.s b/test/MC/PowerPC/ppc64-encoding-ext.s
index f6bfa69..a194d1a 100644
--- a/test/MC/PowerPC/ppc64-encoding-ext.s
+++ b/test/MC/PowerPC/ppc64-encoding-ext.s
@@ -1788,7 +1788,25 @@
# FIXME: Condition register logical mnemonics
-# FIXME: Subtract mnemonics
+# Subtract mnemonics
+
+# CHECK: addi 2, 3, -128 # encoding: [0x38,0x43,0xff,0x80]
+ subi 2, 3, 128
+# CHECK: addis 2, 3, -128 # encoding: [0x3c,0x43,0xff,0x80]
+ subis 2, 3, 128
+# CHECK: addic 2, 3, -128 # encoding: [0x30,0x43,0xff,0x80]
+ subic 2, 3, 128
+# CHECK: addic. 2, 3, -128 # encoding: [0x34,0x43,0xff,0x80]
+ subic. 2, 3, 128
+
+# CHECK: subf 2, 4, 3 # encoding: [0x7c,0x44,0x18,0x50]
+ sub 2, 3, 4
+# CHECK: subf. 2, 4, 3 # encoding: [0x7c,0x44,0x18,0x51]
+ sub. 2, 3, 4
+# CHECK: subfc 2, 4, 3 # encoding: [0x7c,0x44,0x18,0x10]
+ subc 2, 3, 4
+# CHECK: subfc. 2, 4, 3 # encoding: [0x7c,0x44,0x18,0x11]
+ subc. 2, 3, 4
# Compare mnemonics