summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-25 13:16:48 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-25 13:16:48 +0000
commit4069e24bd3b00a2c510c63af2e9271111ae9c3eb (patch)
treec373310f3bd7a024d9d1a03cea6770e72c3c95b3 /llvm/test/MC
parentaaaf28971d621a323fc0c33c18ad509884d176cf (diff)
downloadbcm5719-llvm-4069e24bd3b00a2c510c63af2e9271111ae9c3eb.tar.gz
bcm5719-llvm-4069e24bd3b00a2c510c63af2e9271111ae9c3eb.zip
[PowerPC] Add extended subtract mnemonics
This adds support for the extended subtract mnemonics to the asm parser: subi subis subic subic. sub sub. subc subc. llvm-svn: 184832
Diffstat (limited to 'llvm/test/MC')
-rw-r--r--llvm/test/MC/PowerPC/ppc64-encoding-ext.s20
1 files changed, 19 insertions, 1 deletions
diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-ext.s b/llvm/test/MC/PowerPC/ppc64-encoding-ext.s
index f6bfa6916a7..a194d1a344f 100644
--- a/llvm/test/MC/PowerPC/ppc64-encoding-ext.s
+++ b/llvm/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
OpenPOWER on IntegriCloud