Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / PowerPC / ppc64-reloc-directive.s
blob5f54ac73bcf1626b3623a6257dfb0942cca38cfc
1 # RUN: llvm-mc -triple=powerpc64-linux-musl %s | FileCheck --check-prefix=PRINT %s
2 # RUN: llvm-mc -triple=powerpc64le-linux-musl %s | FileCheck --check-prefix=PRINT %s
4 # RUN: llvm-mc -filetype=obj -triple=powerpc64-linux-musl %s | llvm-readobj -r - | FileCheck %s
5 # RUN: llvm-mc -filetype=obj -triple=powerpc64le-linux-musl %s | llvm-readobj -r - | FileCheck %s
7 # PRINT: .reloc 8, R_PPC64_NONE, .data
8 # PRINT: .reloc 4, R_PPC64_NONE, foo+4
9 # PRINT: .reloc 0, R_PPC64_NONE, 8
10 # PRINT: .reloc 0, R_PPC64_ADDR32, .data+2
11 # PRINT: .reloc 0, R_PPC64_REL16_HI, foo+3
12 # PRINT: .reloc 0, R_PPC64_REL16_HA, 5
13 # PRINT: .reloc 0, BFD_RELOC_NONE, 9
14 # PRINT: .reloc 0, BFD_RELOC_16, 9
15 # PRINT: .reloc 0, BFD_RELOC_32, 9
16 # PRINT: .reloc 0, BFD_RELOC_64, 9
18 # CHECK: 0x8 R_PPC64_NONE .data 0x0
19 # CHECK-NEXT: 0x4 R_PPC64_NONE foo 0x4
20 # CHECK-NEXT: 0x0 R_PPC64_NONE - 0x8
21 # CHECK-NEXT: 0x0 R_PPC64_ADDR32 .data 0x2
22 # CHECK-NEXT: 0x0 R_PPC64_REL16_HI foo 0x3
23 # CHECK-NEXT: 0x0 R_PPC64_REL16_HA - 0x5
24 # CHECK-NEXT: 0x0 R_PPC64_NONE - 0x9
25 # CHECK-NEXT: 0x0 R_PPC64_ADDR16 - 0x9
26 # CHECK-NEXT: 0x0 R_PPC64_ADDR32 - 0x9
27 # CHECK-NEXT: 0x0 R_PPC64_ADDR64 - 0x9
29 .text
30 blr
31 nop
32 nop
33 .reloc 8, R_PPC64_NONE, .data
34 .reloc 4, R_PPC64_NONE, foo+4
35 .reloc 0, R_PPC64_NONE, 8
36 .reloc 0, R_PPC64_ADDR32, .data+2
37 .reloc 0, R_PPC64_REL16_HI, foo+3
38 .reloc 0, R_PPC64_REL16_HA, 5
40 .reloc 0, BFD_RELOC_NONE, 9
41 .reloc 0, BFD_RELOC_16, 9
42 .reloc 0, BFD_RELOC_32, 9
43 .reloc 0, BFD_RELOC_64, 9
45 .data
46 .globl foo
47 foo:
48 .word 0
49 .word 0
50 .word 0