aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorZoran Jovanovic <zoran.jovanovic@imgtec.com>2013-11-08 14:55:31 +0000
committerZoran Jovanovic <zoran.jovanovic@imgtec.com>2013-11-08 14:55:31 +0000
commitc9af1add85658763d34dea1abb49be49eb71bb13 (patch)
treec9bb1fa56bc5ec2aa2a08c3f8dd8e0191c1fde6e /test/MC
parent6af8781854a15eadb9df6b45f27fa5cceda5eb16 (diff)
downloadexternal_llvm-c9af1add85658763d34dea1abb49be49eb71bb13.zip
external_llvm-c9af1add85658763d34dea1abb49be49eb71bb13.tar.gz
external_llvm-c9af1add85658763d34dea1abb49be49eb71bb13.tar.bz2
Test for microMIPS trap instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Mips/micromips-trap-instructions.s32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/MC/Mips/micromips-trap-instructions.s b/test/MC/Mips/micromips-trap-instructions.s
new file mode 100644
index 0000000..a98e02c
--- /dev/null
+++ b/test/MC/Mips/micromips-trap-instructions.s
@@ -0,0 +1,32 @@
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips \
+# RUN: | FileCheck -check-prefix=CHECK-EL %s
+# RUN: llvm-mc %s -triple=mips -show-encoding -mattr=micromips \
+# RUN: | FileCheck -check-prefix=CHECK-EB %s
+# Check that the assembler can handle the documented syntax
+# for miscellaneous instructions
+#------------------------------------------------------------------------------
+# Miscellaneous Instructions
+#------------------------------------------------------------------------------
+# Little endian
+#------------------------------------------------------------------------------
+# CHECK-EL: teq $8, $9, 0 # encoding: [0x28,0x01,0x3c,0x00]
+# CHECK-EL: tge $8, $9, 0 # encoding: [0x28,0x01,0x3c,0x02]
+# CHECK-EL: tgeu $8, $9, 0 # encoding: [0x28,0x01,0x3c,0x04]
+# CHECK-EL: tlt $8, $9, 0 # encoding: [0x28,0x01,0x3c,0x08]
+# CHECK-EL: tltu $8, $9, 0 # encoding: [0x28,0x01,0x3c,0x0a]
+# CHECK-EL: tne $8, $9, 0 # encoding: [0x28,0x01,0x3c,0x0c]
+#------------------------------------------------------------------------------
+# Big endian
+#------------------------------------------------------------------------------
+# CHECK-EB: teq $8, $9, 0 # encoding: [0x01,0x28,0x00,0x3c]
+# CHECK-EB: tge $8, $9, 0 # encoding: [0x01,0x28,0x02,0x3c]
+# CHECK-EB: tgeu $8, $9, 0 # encoding: [0x01,0x28,0x04,0x3c]
+# CHECK-EB: tlt $8, $9, 0 # encoding: [0x01,0x28,0x08,0x3c]
+# CHECK-EB: tltu $8, $9, 0 # encoding: [0x01,0x28,0x0a,0x3c]
+# CHECK-EB: tne $8, $9, 0 # encoding: [0x01,0x28,0x0c,0x3c]
+ teq $8, $9, 0
+ tge $8, $9, 0
+ tgeu $8, $9, 0
+ tlt $8, $9, 0
+ tltu $8, $9, 0
+ tne $8, $9, 0