Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / sparcv9-reloc.s
blobec9abd6dc3bb544d217e82615b85948e9581b4fe
1 # REQUIRES: sparc
2 # RUN: llvm-mc -filetype=obj -triple=sparcv9 %s -o %t.o
3 # RUN: ld.lld %t.o --defsym=a=0x0123456789ABCDEF --defsym=b=0x0123456789A --defsym=c=0x01234567 -o %t
4 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
5 # RUN: llvm-objdump -s %t | FileCheck --check-prefix=HEX %s
7 ## R_SPARC_HH22, R_SPARC_HM10
8 # CHECK-LABEL: section .ABS_64:
9 # CHECK: sethi 18641, %o0
10 # CHECK-NEXT: or %o0, 359, %o0
11 .section .ABS_64,"ax",@progbits
12 sethi %hh(a), %o0
13 or %o0, %hm(a), %o0
15 ## R_SPARC_H44, R_SPARC_M44, R_SPARC_L44
16 # CHECK-LABEL: section .ABS_44:
17 # CHECK: sethi 18641, %o0
18 # CHECK: or %o0, 359, %o0
19 # CHECK: or %o0, 2202, %o0
20 .section .ABS_44,"ax",@progbits
21 sethi %h44(b), %o0
22 or %o0, %m44(b), %o0
23 sllx %o0, 12, %o0
24 or %o0, %l44(b), %o0
26 ## R_SPARC_HI22, R_SPARC_LO10
27 # CHECK-LABEL: section .ABS_32:
28 # CHECK: sethi 18641, %o0
29 # CHECK-NEXT: or %o0, 359, %o0
30 .section .ABS_32,"ax",@progbits
31 sethi %hi(c), %o0
32 or %o0, %lo(c), %o0
34 ## R_SPARC_64, R_SPARC_32
35 # HEX-LABEL: section .ABS_DATA:
36 # HEX-NEXT: 01234567 89abcdef 01234567
37 .section .ABS_DATA,"ax",@progbits
38 .quad a
39 .long c