[llvm-commits] [llvm] r138347 - in /llvm/trunk/test/MC/ARM: basic-thumb-instructions.s thumb-diagnostics.s
Jim Grosbach
grosbach at apple.com
Tue Aug 23 11:33:38 PDT 2011
Author: grosbach
Date: Tue Aug 23 13:33:38 2011
New Revision: 138347
URL: http://llvm.org/viewvc/llvm-project?rev=138347&view=rev
Log:
Thumb parsing and encoding for STR.
Not including tSTRspi.
Modified:
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
llvm/trunk/test/MC/ARM/thumb-diagnostics.s
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138347&r1=138346&r2=138347&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Tue Aug 23 13:33:38 2011
@@ -435,3 +435,25 @@
@ CHECK: stm r1!, {r2, r6} @ encoding: [0x44,0xc1]
@ CHECK: stm r1!, {r1, r2, r3, r7} @ encoding: [0x8e,0xc1]
+
+
+ at ------------------------------------------------------------------------------
+@ STR (immediate)
+ at ------------------------------------------------------------------------------
+ str r2, [r7]
+ str r2, [r7, #0]
+ str r5, [r1, #4]
+ str r3, [r7, #124]
+
+@ CHECK: str r2, [r7] @ encoding: [0x3a,0x60]
+@ CHECK: str r2, [r7] @ encoding: [0x3a,0x60]
+@ CHECK: str r5, [r1, #4] @ encoding: [0x4d,0x60]
+@ CHECK: str r3, [r7, #124] @ encoding: [0xfb,0x67]
+
+
+ at ------------------------------------------------------------------------------
+@ STR (register)
+ at ------------------------------------------------------------------------------
+ str r2, [r7, r3]
+
+@ CHECK: str r2, [r7, r3] @ encoding: [0xfa,0x50]
Modified: llvm/trunk/test/MC/ARM/thumb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb-diagnostics.s?rev=138347&r1=138346&r2=138347&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb-diagnostics.s (original)
+++ llvm/trunk/test/MC/ARM/thumb-diagnostics.s Tue Aug 23 13:33:38 2011
@@ -93,3 +93,18 @@
@ CHECK-ERRORS: error: destination register must match source register
@ CHECK-ERRORS: muls r1, r2, r3
@ CHECK-ERRORS: ^
+
+
+@ Out of range immediates for STR instruction.
+ str r2, [r7, #-1]
+ str r5, [r1, #3]
+ str r3, [r7, #128]
+@ CHECK-ERRORS: error: instruction requires a CPU feature not currently enabled
+@ CHECK-ERRORS: str r2, [r7, #-1]
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: instruction requires a CPU feature not currently enabled
+@ CHECK-ERRORS: str r5, [r1, #3]
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: instruction requires a CPU feature not currently enabled
+@ CHECK-ERRORS: str r3, [r7, #128]
+@ CHECK-ERRORS: ^
More information about the llvm-commits
mailing list