summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-04-05 20:57:13 +0000
committerJim Grosbach <grosbach@apple.com>2012-04-05 20:57:13 +0000
commit4e53fe8dc61ad48650ac6fe30d7268ec92b7fc1a (patch)
treebd37da01517027fc8147c5ac488d4a91a5862917 /test
parentba9536a3c613f80585a078e64aa9c35abb8003fa (diff)
downloadllvm-4e53fe8dc61ad48650ac6fe30d7268ec92b7fc1a.tar.gz
llvm-4e53fe8dc61ad48650ac6fe30d7268ec92b7fc1a.tar.bz2
llvm-4e53fe8dc61ad48650ac6fe30d7268ec92b7fc1a.tar.xz
ARM assembly aliases for add negative immediates using sub.
'add r2, #-1024' should just use 'sub r2, #1024' rather than erroring out. Thumb1 aliases for adding a negative immediate to the stack pointer, also. rdar://11192734 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/ARM/basic-thumb-instructions.s4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s
index 6e830cd557..0a083d0722 100644
--- a/test/MC/ARM/basic-thumb-instructions.s
+++ b/test/MC/ARM/basic-thumb-instructions.s
@@ -59,12 +59,16 @@ _func:
add sp, sp, #4
add r2, sp, #8
add r2, sp, #1020
+ add sp, sp, #-8
+ add sp, #-8
@ CHECK: add sp, #4 @ encoding: [0x01,0xb0]
@ CHECK: add sp, #508 @ encoding: [0x7f,0xb0]
@ CHECK: add sp, #4 @ encoding: [0x01,0xb0]
@ CHECK: add r2, sp, #8 @ encoding: [0x02,0xaa]
@ CHECK: add r2, sp, #1020 @ encoding: [0xff,0xaa]
+@ CHECK: sub sp, #8 @ encoding: [0x82,0xb0]
+@ CHECK: sub sp, #8 @ encoding: [0x82,0xb0]
@------------------------------------------------------------------------------