Test case for r180241.
authorAkira Hatanaka <ahatanaka@mips.com>
Thu, 25 Apr 2013 02:22:07 +0000 (02:22 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Thu, 25 Apr 2013 02:22:07 +0000 (02:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180246 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/Mips/micromips-loadstore-instructions.s [new file with mode: 0644]

diff --git a/test/MC/Mips/micromips-loadstore-instructions.s b/test/MC/Mips/micromips-loadstore-instructions.s
new file mode 100644 (file)
index 0000000..623e2ac
--- /dev/null
@@ -0,0 +1,22 @@
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips | FileCheck %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]
+     lb     $5, 8($4)
+     lbu    $6, 8($4)
+     lh     $2, 8($4)
+     lhu    $4, 8($2)
+     lw     $6, 4($5)
+     sb     $5, 8($4)
+     sh     $2, 8($4)
+     sw     $5, 4($6)