summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2013-10-21 13:07:13 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2013-10-21 13:07:13 +0000
commit348da8d6b5e002c3698c37aca26c508bc60a05bb (patch)
tree62958fb8cd7447cb983f8ef818308c00e92055a4 /test
parentb14ad465492c472033e9ded65ab40e4a9c2c451a (diff)
downloadllvm-348da8d6b5e002c3698c37aca26c508bc60a05bb.tar.gz
llvm-348da8d6b5e002c3698c37aca26c508bc60a05bb.tar.bz2
llvm-348da8d6b5e002c3698c37aca26c508bc60a05bb.tar.xz
[mips][msa] Direct Object Emission support for LD/ST instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/Mips/msa/test_mi10.s30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/MC/Mips/msa/test_mi10.s b/test/MC/Mips/msa/test_mi10.s
new file mode 100644
index 0000000000..80257cda85
--- /dev/null
+++ b/test/MC/Mips/msa/test_mi10.s
@@ -0,0 +1,30 @@
+# 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: ld.b $w2, 1($7) # encoding: [0x78,0x01,0x38,0xa0]
+# CHECK: ld.h $w16, -9($zero) # encoding: [0x7b,0xf7,0x04,0x21]
+# CHECK: ld.w $w13, -6($4) # encoding: [0x7b,0xfa,0x23,0x62]
+# CHECK: ld.d $w1, -5($16) # encoding: [0x7b,0xfb,0x80,0x63]
+# CHECK: st.b $w29, 1($14) # encoding: [0x78,0x01,0x77,0x64]
+# CHECK: st.h $w6, -1($8) # encoding: [0x7b,0xff,0x41,0xa5]
+# CHECK: st.w $w18, 8($15) # encoding: [0x78,0x08,0x7c,0xa6]
+# CHECK: st.d $w3, -14($18) # encoding: [0x7b,0xf2,0x90,0xe7]
+
+# CHECKOBJDUMP: ld.b $w2, 1($7)
+# CHECKOBJDUMP: ld.h $w16, -9($zero)
+# CHECKOBJDUMP: ld.w $w13, -6($4)
+# CHECKOBJDUMP: ld.d $w1, -5($16)
+# CHECKOBJDUMP: st.b $w29, 1($14)
+# CHECKOBJDUMP: st.h $w6, -1($8)
+# CHECKOBJDUMP: st.w $w18, 8($15)
+# CHECKOBJDUMP: st.d $w3, -14($18)
+
+ ld.b $w2, 1($7)
+ ld.h $w16, -9($zero)
+ ld.w $w13, -6($4)
+ ld.d $w1, -5($16)
+ st.b $w29, 1($14)
+ st.h $w6, -1($8)
+ st.w $w18, 8($15)
+ st.d $w3, -14($18)