3 # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t1.o
4 # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %p/Inputs/ppc64-no-split-stack.s -o %t2.o
6 # RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 32768
7 # RUN: llvm-objdump -d %t | FileCheck %s
8 # RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 4096
9 # RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=SMALL
10 # RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 0
11 # RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=ZERO
12 # RUN: not ld.lld %t1.o %t2.o -o /dev/null -split-stack-adjust-size -1 2>&1 | FileCheck %s -check-prefix=ERR
13 # ERR: error: --split-stack-adjust-size: size must be >= 0
15 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t1.o
16 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/ppc64-no-split-stack.s -o %t2.o
18 # RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 32768
19 # RUN: llvm-objdump -d %t | FileCheck %s
20 # RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 4096
21 # RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=SMALL
22 # RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 0
23 # RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=ZERO
26 .type caller, @function
29 addis 2, 12, .TOC.-.Lcaller_gep@ha
30 addi 2, 2, .TOC.-.Lcaller_gep@l
31 .localentry caller, .-caller
36 blt- 7, .Lcaller_alloc_more
54 .size caller, .-caller
57 # CHECK: ld 0, -28736(13)
58 # CHECK-NEXT: addis 12, 1, -1
59 # CHECK-NEXT: addi 12, 12, 32736
60 # CHECK-NEXT: cmpld 7, 12, 0
61 # CHECK-NEXT: bt- 28, 0x10010204
64 # SMALL: ld 0, -28736(13)
65 # SMALL-NEXT: addi 12, 1, -4128
67 # SMALL-NEXT: cmpld 7, 12, 0
68 # SMALL-NEXT: bt- 28, 0x10010204
71 # ZERO: ld 0, -28736(13)
72 # ZERO-NEXT: addi 12, 1, -32
74 # ZERO-NEXT: cmpld 7, 12, 0
75 # ZERO-NEXT: bt- 28, 0x10010204
81 addis 2,12,.TOC.-.Lmain_gep@ha
82 addi 2,2,.TOC.-.Lmain_gep@l
83 .localentry main,.-main
88 blt- 7, .Lmain_morestack
108 .section .note.GNU-split-stack,"",@progbits