summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Sparc
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2014-03-01 18:54:52 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2014-03-01 18:54:52 +0000
commite0c5bff720b2ad211c7cffa91be14b64618e69eb (patch)
tree1da71673d1c43ceeb03b7301b75efb0cf590b214 /llvm/test/MC/Sparc
parent2a9c4306774b5945bfb183bb8038ec7c2786afbf (diff)
downloadbcm5719-llvm-e0c5bff720b2ad211c7cffa91be14b64618e69eb.tar.gz
bcm5719-llvm-e0c5bff720b2ad211c7cffa91be14b64618e69eb.zip
[Sparc] Add support for parsing sparcv9 instructions addc/subc/addccc/subccc.
llvm-svn: 202598
Diffstat (limited to 'llvm/test/MC/Sparc')
-rw-r--r--llvm/test/MC/Sparc/sparcv9-instructions.s23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/MC/Sparc/sparcv9-instructions.s b/llvm/test/MC/Sparc/sparcv9-instructions.s
new file mode 100644
index 00000000000..37f4c8b2f6b
--- /dev/null
+++ b/llvm/test/MC/Sparc/sparcv9-instructions.s
@@ -0,0 +1,23 @@
+! RUN: not llvm-mc %s -arch=sparc -show-encoding 2>&1 | FileCheck %s --check-prefix=V8
+! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s --check-prefix=V9
+
+ ! V8: error: invalid instruction mnemonic
+ ! V8-NEXT: addc %g2, %g1, %g3
+ ! V9: addx %g2, %g1, %g3 ! encoding: [0x86,0x40,0x80,0x01]
+ addc %g2, %g1, %g3
+
+ ! V8: error: invalid instruction mnemonic
+ ! V8-NEXT: addccc %g1, %g2, %g3
+ ! V9: addxcc %g1, %g2, %g3 ! encoding: [0x86,0xc0,0x40,0x02]
+ addccc %g1, %g2, %g3
+
+ ! V8: error: invalid instruction mnemonic
+ ! V8-NEXT: subc %g2, %g1, %g3
+ ! V9: subx %g2, %g1, %g3 ! encoding: [0x86,0x60,0x80,0x01]
+ subc %g2, %g1, %g3
+
+ ! V8: error: invalid instruction mnemonic
+ ! V8-NEXT: subccc %g1, %g2, %g3
+ ! V9: subxcc %g1, %g2, %g3 ! encoding: [0x86,0xe0,0x40,0x02]
+ subccc %g1, %g2, %g3
+
OpenPOWER on IntegriCloud