summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/ARM/arm_fixups.s
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-07-19 19:13:28 +0000
committerJim Grosbach <grosbach@apple.com>2011-07-19 19:13:28 +0000
commit7c09e3c3f339161f8c814aceccb9ed2e97b1d412 (patch)
tree2724997503657e6b6b10fec5ad8f8c7dbf3ec7c9 /llvm/test/MC/ARM/arm_fixups.s
parent20dd6e9faef134594735b95ce48d7f36c40aad6c (diff)
downloadbcm5719-llvm-7c09e3c3f339161f8c814aceccb9ed2e97b1d412.tar.gz
bcm5719-llvm-7c09e3c3f339161f8c814aceccb9ed2e97b1d412.zip
ARM assembly parsing for MOV (immediate).
Add range checking for the immediate operand and handle the "mov" mnemonic choosing between encodings based on the value of the immediate. Add tests for fixups, encoding choice and values, and diagnostic for out of range values. llvm-svn: 135500
Diffstat (limited to 'llvm/test/MC/ARM/arm_fixups.s')
-rw-r--r--llvm/test/MC/ARM/arm_fixups.s20
1 files changed, 15 insertions, 5 deletions
diff --git a/llvm/test/MC/ARM/arm_fixups.s b/llvm/test/MC/ARM/arm_fixups.s
index 2b7878224d7..aba0cd824db 100644
--- a/llvm/test/MC/ARM/arm_fixups.s
+++ b/llvm/test/MC/ARM/arm_fixups.s
@@ -1,7 +1,17 @@
-// RUN: llvm-mc -triple arm-unknown-unknown %s --show-encoding > %t
-// RUN: FileCheck < %t %s
+@ RUN: llvm-mc -triple armv7-unknown-unknown %s --show-encoding > %t
+@ RUN: FileCheck < %t %s
-// CHECK: bl _printf @ encoding: [A,A,A,0xeb]
-// CHECK: @ fixup A - offset: 0, value: _printf, kind: fixup_arm_uncondbranch
-bl _printf
+ bl _printf
+@ CHECK: bl _printf @ encoding: [A,A,A,0xeb]
+@ CHECK: @ fixup A - offset: 0, value: _printf, kind: fixup_arm_uncondbranch
+ mov r9, :lower16:(_foo)
+ movw r9, :lower16:(_foo)
+ movt r9, :upper16:(_foo)
+
+@ CHECK: movw r9, :lower16:_foo @ encoding: [A,0x90'A',0b0000AAAA,0xe3]
+@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movw_lo16
+@ CHECK: movw r9, :lower16:_foo @ encoding: [A,0x90'A',0b0000AAAA,0xe3]
+@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movw_lo16
+@ CHECK: movt r9, :upper16:_foo @ encoding: [A,0x90'A',0b0100AAAA,0xe3]
+@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_arm_movt_hi16
OpenPOWER on IntegriCloud