• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: ppc
2# RUN: echo 'SECTIONS { \
3# RUN:       .text_low 0x10010000: { *(.text_low) } \
4# RUN:       .text_high 0x10080000 : { *(.text_high) } \
5# RUN:       }' > %t.script
6
7# RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
8# RUN: ld.lld -T %t.script %t.o -o %t
9# RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYMBOL
10# RUN: llvm-objdump -d --no-show-raw-insn --mcpu=future %t | FileCheck %s
11
12# RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o
13# RUN: ld.lld -T %t.script %t.o -o %t
14# RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYMBOL
15# RUN: llvm-objdump -d --no-show-raw-insn --mcpu=future %t | FileCheck %s
16
17.section .text_low, "ax", %progbits
18# CHECK-LABEL: <GlobIntPCRel>:
19# CHECK-NEXT:    10010000:        plwa 3, 12(0), 1
20# SYMBOL:        1001000c     4 NOTYPE  LOCAL  DEFAULT     1 glob_int
21GlobIntPCRel:
22	plwa 3, glob_int@PCREL(0), 1
23	blr
24glob_int:
25	.long	0
26	.size	glob_int, 4
27
28
29# CHECK-LABEL: <GlobIntPCRelOffset>:
30# CHECK-NEXT:    10010010:        plwa 3, 16(0), 1
31# SYMBOL:        1001001c     8 NOTYPE  LOCAL  DEFAULT     1 glob_int8
32GlobIntPCRelOffset:
33	plwa 3, glob_int8@PCREL+4(0), 1
34	blr
35glob_int8:
36	.quad	0
37	.size	glob_int8, 8
38
39
40# CHECK-LABEL: <GlobIntPCRelBigOffset>:
41# CHECK-NEXT:    10010024:        plwa 3, 458720(0), 1
42# SYMBOL:        10080000     8 NOTYPE  LOCAL  DEFAULT     2 glob_int8_big
43GlobIntPCRelBigOffset:
44	plwa 3, glob_int8_big@PCREL+4(0), 1
45	blr
46.section .text_high, "ax", %progbits
47glob_int8_big:
48	.quad	0
49	.size	glob_int8_big, 8
50