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.
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
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
62 .set v1, 0x123456789abcdef0
69 # CHECK-NEXT: Type: SHT_PROGBITS
71 # CHECK-NEXT: SHF_ALLOC
72 # CHECK-NEXT: SHF_EXECINSTR
74 # CHECK-NEXT: Address: 0x0
76 # CHECK-NEXT: Size: 80
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
97 # CHECK-NEXT: Type: SHT_PROGBITS
99 # CHECK-NEXT: SHF_ALLOC
100 # CHECK-NEXT: SHF_WRITE
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