llvm-6502/test/MC/ARM/hilo-16bit-relocations.s
Evan Cheng 7597212abc Model :upper16: and :lower16: as ARM specific MCTargetExpr. This is a step
in the right direction. It eliminated some hacks and will unblock codegen
work. But it's far from being done. It doesn't reject illegal expressions,
e.g. (FOO - :lower16:BAR). It also doesn't work in Thumb2 mode at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123369 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-13 07:58:56 +00:00

22 lines
770 B
ArmAsm

@ RUN: llvm-mc %s -triple armv7-apple-darwin -show-encoding | FileCheck %s
_t:
movw r0, :lower16:(L_foo$non_lazy_ptr - (L1 + 8))
movt r0, :upper16:(L_foo$non_lazy_ptr - (L1 + 8))
L1:
@ CHECK: movw r0, :lower16:(L_foo$non_lazy_ptr-(L1+8)) @ encoding: [A,A,0x00,0xe3]
@ CHECK: @ fixup A - offset: 0, value: L_foo$non_lazy_ptr-(L1+8), kind: fixup_arm_movw_lo16_pcrel
@ CHECK: movt r0, :upper16:(L_foo$non_lazy_ptr-(L1+8)) @ encoding: [A,A,0x40,0xe3]
@ CHECK: @ fixup A - offset: 0, value: L_foo$non_lazy_ptr-(L1+8), kind: fixup_arm_movt_hi16_pcrel
.comm _foo,4,2
.section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
.align 2
L_foo$non_lazy_ptr:
.indirect_symbol _foo
.long 0
.subsections_via_symbols