2 # RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t.o
3 # RUN: llvm-readobj -r %t.o | FileCheck --check-prefix=RELOC %s
4 # RUN: ld.lld %t.o -o %t
5 # RUN: llvm-objdump -d --print-imm-hex %t | FileCheck %s
8 .type _start, @function
12 # RELOC: 0x4 R_HEX_TPREL_32_6_X a 0x0
13 # RELOC-NEXT: 0x8 R_HEX_TPREL_16_X a 0x0
14 # CHECK: { immext(#0xffffffc0)
15 # CHECK-NEXT: r1 = add(r0,##-0x10) }
16 r1 = add(r0,##a@TPREL)
18 # RELOC-NEXT: 0xC R_HEX_TPREL_32_6_X a 0x0
19 # RELOC-NEXT: 0x10 R_HEX_TPREL_11_X a 0x0
20 # CHECK: { immext(#0xffffffc0)
21 # CHECK-NEXT: r2 = memw(r0+##-0x10) }
22 r2 = memw
(r0+
##a@TPREL)
24 # RELOC-NEXT: 0x14 R_HEX_TPREL_HI16 a 0x0
26 # CHECK: { r3.h = #0xffff }
29 # RELOC-NEXT: 0x18 R_HEX_TPREL_LO16 a 0x0
31 # CHECK: { r3.l = #0xfff0 }
34 # RELOC-NEXT: 0x1C R_HEX_TPREL_16 a 0x0
35 # CHECK: { r4 = #-0x10 }
38 .section .tdata,"awT",@progbits