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: not ld.lld %t1.o %t2.o -o /dev/null --defsym __morestack=0x10010000 2>&1 | \
7 # RUN: FileCheck -check-prefix=OVERFLOW %s
8 # RUN: not ld.lld %t1.o %t2.o -o /dev/null --defsym __morestack=0x10010000 \
9 # RUN: -split-stack-adjust-size 4097 2>&1 | FileCheck -check-prefix=OVERFLOW %s
10 # RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 4096
11 # RUN: llvm-objdump -d %t | FileCheck %s
13 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t1.o
14 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/ppc64-no-split-stack.s -o %t2.o
16 # RUN: not ld.lld %t1.o %t2.o -o /dev/null --defsym __morestack=0x10010000 2>&1 | \
17 # RUN: FileCheck -check-prefix=OVERFLOW %s
18 # RUN: not ld.lld %t1.o %t2.o -o /dev/null --defsym __morestack=0x10010000 \
19 # RUN: -split-stack-adjust-size 4097 2>&1 | FileCheck -check-prefix=OVERFLOW %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
23 # OVERFLOW: error: {{.*}}.o:(function caller: .text+0x8): split-stack prologue adjustment overflows
27 .type caller, @function
30 addis 2, 12, .TOC.-.Lcaller_gep@ha
31 addi 2, 2, .TOC.-.Lcaller_gep@l
32 .localentry caller, .-caller
37 blt- 7, .Lcaller_alloc_more
55 .size caller, .-caller
58 # CHECK: ld 0, -28736(13)
59 # CHECK-NEXT: addis 12, 1, -32768
61 # CHECK-NEXT: cmpld 7, 12, 0
62 # CHECK-NEXT: bt- 28, 0x10010204
64 .section .note.GNU-split-stack,"",@progbits