aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/Mips
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2013-10-14 12:57:18 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2013-10-14 12:57:18 +0000
commite89c50acc8312c6cd4d3bdbf50e02ba88e54a663 (patch)
treec3ec72de01965d9ac1ab1e2ac1514ef79fb46cad /test/MC/Mips
parent01436ba3066b99547c1138edf5c36ef2ad467e71 (diff)
downloadexternal_llvm-e89c50acc8312c6cd4d3bdbf50e02ba88e54a663.zip
external_llvm-e89c50acc8312c6cd4d3bdbf50e02ba88e54a663.tar.gz
external_llvm-e89c50acc8312c6cd4d3bdbf50e02ba88e54a663.tar.bz2
[mips][msa] Direct Object Emission support for VEC instructions.
List of instructions: and.v, bmnz.v, bmz.v, bsel.v, nor.v, or.v, xor.v. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips')
-rw-r--r--test/MC/Mips/msa/test_vec.s27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/MC/Mips/msa/test_vec.s b/test/MC/Mips/msa/test_vec.s
new file mode 100644
index 0000000..9294f37
--- /dev/null
+++ b/test/MC/Mips/msa/test_vec.s
@@ -0,0 +1,27 @@
+# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 -mattr=+msa -arch=mips | FileCheck %s
+#
+# RUN: llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 -mattr=+msa -arch=mips -filetype=obj -o - | llvm-objdump -d -triple=mipsel-unknown-linux -mattr=+msa -arch=mips - | FileCheck %s -check-prefix=CHECKOBJDUMP
+#
+# CHECK: and.v $w25, $w20, $w27 # encoding: [0x78,0x1b,0xa6,0x5e]
+# CHECK: bmnz.v $w17, $w6, $w7 # encoding: [0x78,0x87,0x34,0x5e]
+# CHECK: bmz.v $w3, $w17, $w9 # encoding: [0x78,0xa9,0x88,0xde]
+# CHECK: bsel.v $w8, $w0, $w14 # encoding: [0x78,0xce,0x02,0x1e]
+# CHECK: nor.v $w7, $w31, $w0 # encoding: [0x78,0x40,0xf9,0xde]
+# CHECK: or.v $w24, $w26, $w30 # encoding: [0x78,0x3e,0xd6,0x1e]
+# CHECK: xor.v $w7, $w27, $w15 # encoding: [0x78,0x6f,0xd9,0xde]
+
+# CHECKOBJDUMP: and.v $w25, $w20, $w27
+# CHECKOBJDUMP: bmnz.v $w17, $w6, $w7
+# CHECKOBJDUMP: bmz.v $w3, $w17, $w9
+# CHECKOBJDUMP: bsel.v $w8, $w0, $w14
+# CHECKOBJDUMP: nor.v $w7, $w31, $w0
+# CHECKOBJDUMP: or.v $w24, $w26, $w30
+# CHECKOBJDUMP: xor.v $w7, $w27, $w15
+
+ and.v $w25, $w20, $w27
+ bmnz.v $w17, $w6, $w7
+ bmz.v $w3, $w17, $w9
+ bsel.v $w8, $w0, $w14
+ nor.v $w7, $w31, $w0
+ or.v $w24, $w26, $w30
+ xor.v $w7, $w27, $w15