aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/Mips
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2013-10-11 13:29:36 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2013-10-11 13:29:36 +0000
commit6f36ea5c4778ac0519d821798b94aaac92ec1389 (patch)
tree452cbbce020a2ae25674c19220ffed8754cc53b0 /test/MC/Mips
parent71e7893757d4f43de7c060153b2e5e8c53dd2e31 (diff)
downloadexternal_llvm-6f36ea5c4778ac0519d821798b94aaac92ec1389.zip
external_llvm-6f36ea5c4778ac0519d821798b94aaac92ec1389.tar.gz
external_llvm-6f36ea5c4778ac0519d821798b94aaac92ec1389.tar.bz2
[mips][msa] Direct Object Emission of INSERT.{B,H,W} instruction.
INSERT is the first type of MSA instruction that requires a change to the way MSA registers are parsed. This happens because MSA registers may be suffixed by an index in the form of an immediate or a general purpose register. The changes to parseMSARegs reflect that requirement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips')
-rw-r--r--test/MC/Mips/msa/test_elm_insert.s15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/MC/Mips/msa/test_elm_insert.s b/test/MC/Mips/msa/test_elm_insert.s
new file mode 100644
index 0000000..5fc55f3
--- /dev/null
+++ b/test/MC/Mips/msa/test_elm_insert.s
@@ -0,0 +1,15 @@
+# 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: insert.b $w23[3], $sp # encoding: [0x79,0x03,0xed,0xd9]
+# CHECK: insert.h $w20[2], $5 # encoding: [0x79,0x22,0x2d,0x19]
+# CHECK: insert.w $w8[2], $15 # encoding: [0x79,0x32,0x7a,0x19]
+
+# CHECKOBJDUMP: insert.b $w23[3], $sp
+# CHECKOBJDUMP: insert.h $w20[2], $5
+# CHECKOBJDUMP: insert.w $w8[2], $15
+
+ insert.b $w23[3], $sp
+ insert.h $w20[2], $5
+ insert.w $w8[2], $15