summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Disassembler/Sparc/sparc-v9.txt4
-rw-r--r--llvm/test/MC/Sparc/sparcv9-instructions.s5
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/Sparc/sparc-v9.txt b/llvm/test/MC/Disassembler/Sparc/sparc-v9.txt
new file mode 100644
index 00000000000..b8ca01ce04e
--- /dev/null
+++ b/llvm/test/MC/Disassembler/Sparc/sparc-v9.txt
@@ -0,0 +1,4 @@
+# RUN: llvm-mc --disassemble %s -triple=sparcv9-unknown-linux | FileCheck %s
+
+# CHECK: popc %g1, %g2
+0x85 0x70 0x00 0x01
diff --git a/llvm/test/MC/Sparc/sparcv9-instructions.s b/llvm/test/MC/Sparc/sparcv9-instructions.s
index 37f4c8b2f6b..e2cb87e0630 100644
--- a/llvm/test/MC/Sparc/sparcv9-instructions.s
+++ b/llvm/test/MC/Sparc/sparcv9-instructions.s
@@ -21,3 +21,8 @@
! V9: subxcc %g1, %g2, %g3 ! encoding: [0x86,0xe0,0x40,0x02]
subccc %g1, %g2, %g3
+ ! V8: error: instruction requires a CPU feature not currently enabled
+ ! V8-NEXT: popc %g1, %g2
+ ! V9: popc %g1, %g2 ! encoding: [0x85,0x70,0x00,0x01]
+ popc %g1, %g2
+
OpenPOWER on IntegriCloud