aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2013-11-18 12:32:49 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2013-11-18 12:32:49 +0000
commit95adf91f29980e374bf094e15bc3f2764ef9baf4 (patch)
tree96d3e0751088d9406351c72e4d6eff646098f0e2 /test/MC
parentf56f1dfecc04078dd76121cf06dae4024372f329 (diff)
downloadexternal_llvm-95adf91f29980e374bf094e15bc3f2764ef9baf4.zip
external_llvm-95adf91f29980e374bf094e15bc3f2764ef9baf4.tar.gz
external_llvm-95adf91f29980e374bf094e15bc3f2764ef9baf4.tar.bz2
[mips][msa] Fix immediate value of LSA instruction as it was being wrongly encoded.
The immediate field should be encoded as "imm - 1" as the CPU always adds one to that field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Mips/msa/test_lsa.s11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/MC/Mips/msa/test_lsa.s b/test/MC/Mips/msa/test_lsa.s
index 6798ed38..6d1d868 100644
--- a/test/MC/Mips/msa/test_lsa.s
+++ b/test/MC/Mips/msa/test_lsa.s
@@ -2,8 +2,17 @@
#
# 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: lsa $8, $9, $10, 2 # encoding: [0x01,0x2a,0x40,0x85]
+# CHECK: lsa $8, $9, $10, 1 # encoding: [0x01,0x2a,0x40,0x05]
+# CHECK: lsa $8, $9, $10, 2 # encoding: [0x01,0x2a,0x40,0x45]
+# CHECK: lsa $8, $9, $10, 3 # encoding: [0x01,0x2a,0x40,0x85]
+# CHECK: lsa $8, $9, $10, 4 # encoding: [0x01,0x2a,0x40,0xc5]
+# CHECKOBJDUMP: lsa $8, $9, $10, 1
# CHECKOBJDUMP: lsa $8, $9, $10, 2
+# CHECKOBJDUMP: lsa $8, $9, $10, 3
+# CHECKOBJDUMP: lsa $8, $9, $10, 4
+ lsa $8, $9, $10, 1
lsa $8, $9, $10, 2
+ lsa $8, $9, $10, 3
+ lsa $8, $9, $10, 4