Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / PowerPC / ppc64-fixup-apply.s
blobedf03f1cfab36405bad364bf3de139f20bc2ce94
2 # RUN: llvm-mc -triple powerpc64-unknown-unknown -filetype=obj %s | \
3 # RUN: llvm-readobj -S --sd - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-BE %s
4 # RUN: llvm-mc -triple powerpc64le-unknown-unknown -filetype=obj %s | \
5 # RUN: llvm-readobj -S --sd - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-LE %s
7 # This checks that fixups that can be resolved within the same
8 # object file are applied correctly.
10 .text
12 addi 1, 1, target
13 addis 1, 1, target
15 .set target, 0x1234
17 subi 1, 1, -target2@l
18 subis 1, 1, -target2@ha
20 .set target2, 0x12345678
22 addi 1, 1, target3-target4@l
23 subis 1, 1, target4-target3@ha
25 .set target3, 0x23455678
26 .set target4, 0x12341234
28 addi 1, 1, target5+0x8000@l
29 addis 1, 1, target5+0x8000@ha
30 ori 1, 1, target5+0x8000@l
31 oris 1, 1, target5+0x8000@ha
33 .set target5, 0x10000001
36 addi 1, 1, 2f-1b@l
37 addis 1, 1, 1b-2f@ha
40 addi 1, 1, target6@h
41 addis 1, 1, target6@h
43 addi 1, 1, target6@high
44 addis 1, 1, target6@higha
46 .set target6, 0x4321fedc
48 addi 1, 1, target7@higher
49 addis 1, 1, target7@highest
50 addi 1, 1, target7@highera
51 addis 1, 1, target7@highesta
53 .set target7, 0x1234ffffffff8000
55 .data
57 .quad v1
58 .long v2
59 .short v3
60 .byte v4
62 .set v1, 0x123456789abcdef0
63 .set v2, 0x87654321
64 .set v3, 0xbeef
65 .set v4, 0x42
67 # CHECK: Section {
68 # CHECK: Name: .text
69 # CHECK-NEXT: Type: SHT_PROGBITS
70 # CHECK-NEXT: Flags [
71 # CHECK-NEXT: SHF_ALLOC
72 # CHECK-NEXT: SHF_EXECINSTR
73 # CHECK-NEXT: ]
74 # CHECK-NEXT: Address: 0x0
75 # CHECK-NEXT: Offset:
76 # CHECK-NEXT: Size: 80
77 # CHECK-NEXT: Link: 0
78 # CHECK-NEXT: Info: 0
79 # CHECK-NEXT: AddressAlignment: 4
80 # CHECK-NEXT: EntrySize: 0
81 # CHECK-NEXT: SectionData (
82 # CHECK-BE-NEXT: 0000: 38211234 3C211234 38215678 3C211234
83 # CHECK-LE-NEXT: 0000: 34122138 3412213C 78562138 3412213C
84 # CHECK-BE-NEXT: 0010: 38214444 3C211111 38218001 3C211001
85 # CHECK-LE-NEXT: 0010: 44442138 1111213C 01802138 0110213C
86 # CHECK-BE-NEXT: 0020: 60218001 64211001 38210008 3C210000
87 # CHECK-LE-NEXT: 0020: 01802160 01102164 08002138 0000213C
88 # CHECK-BE-NEXT: 0030: 38214321 3C214321 38214321 3C214322
89 # CHECK-LE-NEXT: 0030: 21432138 2143213C 21432138 2243213C
90 # CHECK-BE-NEXT: 0040: 3821FFFF 3C211234 38210000 3C211235
91 # CHECK-LE-NEXT: 0040: FFFF2138 3412213C 00002138 3512213C
92 # CHECK-NEXT: )
93 # CHECK-NEXT: }
95 # CHECK: Section {
96 # CHECK: Name: .data
97 # CHECK-NEXT: Type: SHT_PROGBITS
98 # CHECK-NEXT: Flags [
99 # CHECK-NEXT: SHF_ALLOC
100 # CHECK-NEXT: SHF_WRITE
101 # CHECK-NEXT: ]
102 # CHECK-NEXT: Address: 0x0
103 # CHECK-NEXT: Offset:
104 # CHECK-NEXT: Size: 15
105 # CHECK-NEXT: Link: 0
106 # CHECK-NEXT: Info: 0
107 # CHECK-NEXT: AddressAlignment:
108 # CHECK-NEXT: EntrySize: 0
109 # CHECK-NEXT: SectionData (
110 # CHECK-BE-NEXT: 0000: 12345678 9ABCDEF0 87654321 BEEF42
111 # CHECK-LE-NEXT: 0000: F0DEBC9A 78563412 21436587 EFBE42
112 # CHECK-NEXT: )
113 # CHECK-NEXT: }