aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-31 17:07:33 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-31 17:07:33 +0000
commit0f3abd8d68cfb4a0705d0a8140d7f7dce32f6e77 (patch)
tree4f390cc6b292ef6fad5e5a78d78385b4c4d5b2fb /test
parent61545829832ba0375249c42c84843d0b62c8f55f (diff)
downloadexternal_llvm-0f3abd8d68cfb4a0705d0a8140d7f7dce32f6e77.zip
external_llvm-0f3abd8d68cfb4a0705d0a8140d7f7dce32f6e77.tar.gz
external_llvm-0f3abd8d68cfb4a0705d0a8140d7f7dce32f6e77.tar.bz2
Tweak Thumb1 ADD encoding selection a bit.
When the destination register of an add immediate instruction is explicitly specified, encoding T1 is preferred, else encoding T2 is preferred. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/ARM/basic-thumb-instructions.s4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s
index 54d353e..94ba839 100644
--- a/test/MC/ARM/basic-thumb-instructions.s
+++ b/test/MC/ARM/basic-thumb-instructions.s
@@ -26,11 +26,13 @@ _func:
@ ADD (immediate)
@------------------------------------------------------------------------------
adds r1, r2, #3
+@ When Rd is not explicitly specified, encoding T2 is preferred even though
+@ the literal is in the range [0,7] which would allow encoding T1.
adds r2, #3
adds r2, #8
@ CHECK: adds r1, r2, #3 @ encoding: [0xd1,0x1c]
-@ CHECK: adds r2, r2, #3 @ encoding: [0xd2,0x1c]
+@ CHECK: adds r2, #3 @ encoding: [0x03,0x32]
@ CHECK: adds r2, #8 @ encoding: [0x08,0x32]