summaryrefslogtreecommitdiff
path: root/test/MC/Mips/micromips-loadstore-instructions.s
diff options
context:
space:
mode:
authorJack Carter <jack.carter@imgtec.com>2013-08-08 23:30:40 +0000
committerJack Carter <jack.carter@imgtec.com>2013-08-08 23:30:40 +0000
commitd12fce1a27c30292dcd5f5bc10d4ba6e742888be (patch)
tree2067f8d9a65641e1d5fd5e9ecbb9d510c2190d49 /test/MC/Mips/micromips-loadstore-instructions.s
parent68554401fca3770583d21b8505553e914f9ee307 (diff)
downloadllvm-d12fce1a27c30292dcd5f5bc10d4ba6e742888be.tar.gz
llvm-d12fce1a27c30292dcd5f5bc10d4ba6e742888be.tar.bz2
llvm-d12fce1a27c30292dcd5f5bc10d4ba6e742888be.tar.xz
Mips ELF: MicroMips direct object Little endian support.
Test included. Patch by Zoran Jovanovich git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips/micromips-loadstore-instructions.s')
-rw-r--r--test/MC/Mips/micromips-loadstore-instructions.s32
1 files changed, 23 insertions, 9 deletions
diff --git a/test/MC/Mips/micromips-loadstore-instructions.s b/test/MC/Mips/micromips-loadstore-instructions.s
index 623e2acdcb..cc7514b323 100644
--- a/test/MC/Mips/micromips-loadstore-instructions.s
+++ b/test/MC/Mips/micromips-loadstore-instructions.s
@@ -1,17 +1,31 @@
-# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips | FileCheck %s
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips | FileCheck -check-prefix=CHECK-EL %s
+# RUN: llvm-mc %s -triple=mips -show-encoding -mattr=micromips | FileCheck -check-prefix=CHECK-EB %s
# Check that the assembler can handle the documented syntax
# for load and store instructions.
#------------------------------------------------------------------------------
# Load and Store Instructions
#------------------------------------------------------------------------------
-# CHECK: lb $5, 8($4) # encoding: [0x08,0x00,0xa4,0x1c]
-# CHECK: lbu $6, 8($4) # encoding: [0x08,0x00,0xc4,0x14]
-# CHECK: lh $2, 8($4) # encoding: [0x08,0x00,0x44,0x3c]
-# CHECK: lhu $4, 8($2) # encoding: [0x08,0x00,0x82,0x34]
-# CHECK: lw $6, 4($5) # encoding: [0x04,0x00,0xc5,0xfc]
-# CHECK: sb $5, 8($4) # encoding: [0x08,0x00,0xa4,0x18]
-# CHECK: sh $2, 8($4) # encoding: [0x08,0x00,0x44,0x38]
-# CHECK: sw $5, 4($6) # encoding: [0x04,0x00,0xa6,0xf8]
+# Little endian
+#------------------------------------------------------------------------------
+# CHECK-EL: lb $5, 8($4) # encoding: [0xa4,0x1c,0x08,0x00]
+# CHECK-EL: lbu $6, 8($4) # encoding: [0xc4,0x14,0x08,0x00]
+# CHECK-EL: lh $2, 8($4) # encoding: [0x44,0x3c,0x08,0x00]
+# CHECK-EL: lhu $4, 8($2) # encoding: [0x82,0x34,0x08,0x00]
+# CHECK-EL: lw $6, 4($5) # encoding: [0xc5,0xfc,0x04,0x00]
+# CHECK-EL: sb $5, 8($4) # encoding: [0xa4,0x18,0x08,0x00]
+# CHECK-EL: sh $2, 8($4) # encoding: [0x44,0x38,0x08,0x00]
+# CHECK-EL: sw $5, 4($6) # encoding: [0xa6,0xf8,0x04,0x00]
+#------------------------------------------------------------------------------
+# Big endian
+#------------------------------------------------------------------------------
+# CHECK-EB: lb $5, 8($4) # encoding: [0x1c,0xa4,0x00,0x08]
+# CHECK-EB: lbu $6, 8($4) # encoding: [0x14,0xc4,0x00,0x08]
+# CHECK-EB: lh $2, 8($4) # encoding: [0x3c,0x44,0x00,0x08]
+# CHECK-EB: lhu $4, 8($2) # encoding: [0x34,0x82,0x00,0x08]
+# CHECK-EB: lw $6, 4($5) # encoding: [0xfc,0xc5,0x00,0x04]
+# CHECK-EB: sb $5, 8($4) # encoding: [0x18,0xa4,0x00,0x08]
+# CHECK-EB: sh $2, 8($4) # encoding: [0x38,0x44,0x00,0x08]
+# CHECK-EB: sw $5, 4($6) # encoding: [0xf8,0xa6,0x00,0x04]
lb $5, 8($4)
lbu $6, 8($4)
lh $2, 8($4)