summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVladimir Medic <Vladimir.Medic@imgtec.com>2013-09-06 12:41:17 +0000
committerVladimir Medic <Vladimir.Medic@imgtec.com>2013-09-06 12:41:17 +0000
commitbf7f7b5e0eae40bb47a410c90f9f0885c0f38b2c (patch)
tree938d1c39bd480cfe3c9052bd147c86949da7d512 /test
parenta5eeb9da054bd76b38e18bedb9015bbaf20605e0 (diff)
downloadllvm-bf7f7b5e0eae40bb47a410c90f9f0885c0f38b2c.tar.gz
llvm-bf7f7b5e0eae40bb47a410c90f9f0885c0f38b2c.tar.bz2
llvm-bf7f7b5e0eae40bb47a410c90f9f0885c0f38b2c.tar.xz
This patch adds support for microMIPS Move Conditional instructions. Test cases are included in patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/Disassembler/Mips/micromips.txt12
-rw-r--r--test/MC/Disassembler/Mips/micromips_le.txt12
-rw-r--r--test/MC/Mips/micromips-movcond-instructions.s26
3 files changed, 50 insertions, 0 deletions
diff --git a/test/MC/Disassembler/Mips/micromips.txt b/test/MC/Disassembler/Mips/micromips.txt
index 0b0c7a0515..683c7a0574 100644
--- a/test/MC/Disassembler/Mips/micromips.txt
+++ b/test/MC/Disassembler/Mips/micromips.txt
@@ -147,3 +147,15 @@
# CHECK: swr $4, 16($5)
0x60 0x85 0x90 0x10
+
+# CHECK: movz $9, $6, $7
+0x00 0xe6 0x48 0x58
+
+# CHECK: movn $9, $6, $7
+0x00 0xe6 0x48 0x18
+
+# CHECK: movt $9, $6, $fcc0
+0x55 0x26 0x09 0x7b
+
+# CHECK: movf $9, $6, $fcc0
+0x55 0x26 0x01 0x7b
diff --git a/test/MC/Disassembler/Mips/micromips_le.txt b/test/MC/Disassembler/Mips/micromips_le.txt
index bcefeb49b3..fb183cdb49 100644
--- a/test/MC/Disassembler/Mips/micromips_le.txt
+++ b/test/MC/Disassembler/Mips/micromips_le.txt
@@ -147,3 +147,15 @@
# CHECK: swr $4, 16($5)
0x85 0x60 0x10 0x90
+
+# CHECK: movz $9, $6, $7
+0xe6 0x00 0x58 0x48
+
+# CHECK: movn $9, $6, $7
+0xe6 0x00 0x18 0x48
+
+# CHECK: movt $9, $6, $fcc0
+0x26 0x55 0x7b 0x09
+
+# CHECK: movf $9, $6, $fcc0
+0x26 0x55 0x7b 0x01
diff --git a/test/MC/Mips/micromips-movcond-instructions.s b/test/MC/Mips/micromips-movcond-instructions.s
new file mode 100644
index 0000000000..5da8702d22
--- /dev/null
+++ b/test/MC/Mips/micromips-movcond-instructions.s
@@ -0,0 +1,26 @@
+# 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 move conditional instructions.
+#------------------------------------------------------------------------------
+# Move Conditional
+#------------------------------------------------------------------------------
+# Little endian
+#------------------------------------------------------------------------------
+# CHECK-EL: movz $9, $6, $7 # encoding: [0xe6,0x00,0x58,0x48]
+# CHECK-EL: movn $9, $6, $7 # encoding: [0xe6,0x00,0x18,0x48]
+# CHECK-EL: movt $9, $6, $fcc0 # encoding: [0x26,0x55,0x7b,0x09]
+# CHECK-EL: movf $9, $6, $fcc0 # encoding: [0x26,0x55,0x7b,0x01]
+#------------------------------------------------------------------------------
+# Big endian
+#------------------------------------------------------------------------------
+# CHECK-EB: movz $9, $6, $7 # encoding: [0x00,0xe6,0x48,0x58]
+# CHECK-EB: movn $9, $6, $7 # encoding: [0x00,0xe6,0x48,0x18]
+# CHECK-EB: movt $9, $6, $fcc0 # encoding: [0x55,0x26,0x09,0x7b]
+# CHECK-EB: movf $9, $6, $fcc0 # encoding: [0x55,0x26,0x01,0x7b]
+ movz $9, $6, $7
+ movn $9, $6, $7
+ movt $9, $6, $fcc0
+ movf $9, $6, $fcc0