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 .set target6, 0x4321fedc
45 addi 1, 1, target7@higher
46 addis 1, 1, target7@highest
47 addi 1, 1, target7@highera
48 addis 1, 1, target7@highesta
50 .set target7, 0x1234ffffffff8000
59 .set v1, 0x123456789abcdef0
66 # CHECK-NEXT: Type: SHT_PROGBITS
68 # CHECK-NEXT: SHF_ALLOC
69 # CHECK-NEXT: SHF_EXECINSTR
71 # CHECK-NEXT: Address: 0x0
73 # CHECK-NEXT: Size: 72
76 # CHECK-NEXT: AddressAlignment: 4
77 # CHECK-NEXT: EntrySize: 0
78 # CHECK-NEXT: SectionData (
79 # CHECK-BE-NEXT: 0000: 38211234 3C211234 38215678 3C211234
80 # CHECK-LE-NEXT: 0000: 34122138 3412213C 78562138 3412213C
81 # CHECK-BE-NEXT: 0010: 38214444 3C211111 38218001 3C211001
82 # CHECK-LE-NEXT: 0010: 44442138 1111213C 01802138 0110213C
83 # CHECK-BE-NEXT: 0020: 60218001 64211001 38210008 3C210000
84 # CHECK-LE-NEXT: 0020: 01802160 01102164 08002138 0000213C
85 # CHECK-BE-NEXT: 0030: 38214321 3C214321 3821FFFF 3C211234
86 # CHECK-LE-NEXT: 0030: 21432138 2143213C FFFF2138 3412213C
87 # CHECK-BE-NEXT: 0040: 38210000 3C211235
88 # CHECK-LE-NEXT: 0040: 00002138 3512213C
94 # CHECK-NEXT: Type: SHT_PROGBITS
96 # CHECK-NEXT: SHF_ALLOC
97 # CHECK-NEXT: SHF_WRITE
99 # CHECK-NEXT: Address: 0x0
100 # CHECK-NEXT: Offset:
101 # CHECK-NEXT: Size: 15
102 # CHECK-NEXT: Link: 0
103 # CHECK-NEXT: Info: 0
104 # CHECK-NEXT: AddressAlignment:
105 # CHECK-NEXT: EntrySize: 0
106 # CHECK-NEXT: SectionData (
107 # CHECK-BE-NEXT: 0000: 12345678 9ABCDEF0 87654321 BEEF42
108 # CHECK-LE-NEXT: 0000: F0DEBC9A 78563412 21436587 EFBE42