Tests for Thumb2 AND (immediate) instruction.
authorJim Grosbach <grosbach@apple.com>
Fri, 2 Sep 2011 17:44:27 +0000 (17:44 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 2 Sep 2011 17:44:27 +0000 (17:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139013 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/ARM/basic-thumb2-instructions.s
test/MC/ARM/thumb2.s

index e8ff1e97a824918641bdd116ac3afe890683db76..ad85bd8350451eb2dd17a3637a5ba39ee863d5fc 100644 (file)
@@ -91,6 +91,18 @@ _func:
 @ FIXME: ADR
 @------------------------------------------------------------------------------
 
+@------------------------------------------------------------------------------
+@ AND (immediate)
+@------------------------------------------------------------------------------
+        and r2, r5, #0xff000
+        ands r3, r12, #0xf
+        and r1, #0xff
+        and r1, r1, #0xff
+
+@ CHECK: and   r2, r5, #1044480        @ encoding: [0x05,0xf4,0x7f,0x22]
+@ CHECK: ands  r3, r12, #15            @ encoding: [0x1c,0xf0,0x0f,0x03]
+@ CHECK: and   r1, r1, #255            @ encoding: [0x01,0xf0,0xff,0x01]
+@ CHECK: and   r1, r1, #255            @ encoding: [0x01,0xf0,0xff,0x01]
 
 @------------------------------------------------------------------------------
 @ B
index b4734b5bf893d36180820898bc10b90e2cfecd5d..30c99627d22333bbc0576605daeaff0a22c4bed3 100644 (file)
 @ CHECK: ssat16  r0, #7, r0 @ encoding: [0x20,0xf3,0x06,0x00]
   ssat16  r0, #7, r0
 
-  and r1, #0xff
-  and r1, r1, #0xff
   orr r1, 0x100
   orr r1, r1, 0x100
   eor r1, 0x100
   bic r1, 0x100
   bic r1, r1, 0x100
 
-@ CHECK: and r1, r1, #255 @ encoding: [0x01,0xf0,0xff,0x01]
-@ CHECK: and r1, r1, #255 @ encoding: [0x01,0xf0,0xff,0x01]
 @ CHECK: orr r1, r1, #256 @ encoding: [0x41,0xf4,0x80,0x71]
 @ CHECK: orr r1, r1, #256 @ encoding: [0x41,0xf4,0x80,0x71]
 @ CHECK: eor r1, r1, #256 @ encoding: [0x81,0xf4,0x80,0x71]