65 lines · plain
1# REQUIRES: ppc2 3# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t1.o4# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %p/Inputs/ppc64-no-split-stack.s -o %t2.o5 6# RUN: not ld.lld %t1.o %t2.o -o /dev/null --defsym __morestack=0x10010000 2>&1 | \7# RUN: FileCheck -check-prefix=OVERFLOW %s8# 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 %s10# RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 409611# RUN: llvm-objdump -d %t | FileCheck %s12 13# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t1.o14# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/ppc64-no-split-stack.s -o %t2.o15 16# RUN: not ld.lld %t1.o %t2.o -o /dev/null --defsym __morestack=0x10010000 2>&1 | \17# RUN: FileCheck -check-prefix=OVERFLOW %s18# 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 %s20# RUN: ld.lld %t1.o %t2.o -o %t --defsym __morestack=0x10010000 -split-stack-adjust-size 409621# RUN: llvm-objdump -d %t | FileCheck %s22 23# OVERFLOW: error: {{.*}}.o:(function caller: .text+0x8): split-stack prologue adjustment overflows24 25 .p2align 226 .global caller27 .type caller, @function28caller:29.Lcaller_gep:30 addis 2, 12, .TOC.-.Lcaller_gep@ha31 addi 2, 2, .TOC.-.Lcaller_gep@l32 .localentry caller, .-caller33 ld 0, -0x7040(13)34 addis 12, 1, -3276835 addi 12, 12, 409636 cmpld 7, 12, 037 blt- 7, .Lcaller_alloc_more38.Lcaller_body:39 mflr 040 std 0, 16(1)41 stdu 1, -32(1)42 bl nss_callee43 addi 1, 1, 3244 ld 0, 16(1)45 mtlr 046 blr47.Lcaller_alloc_more:48 mflr 049 std 0, 16(1)50 bl __morestack51 ld 0, 16(1)52 mtlr 053 blr54 b .Lcaller_body55 .size caller, .-caller56 57# CHECK-LABEL: caller58# CHECK: ld 0, -28736(13)59# CHECK-NEXT: addis 12, 1, -3276860# CHECK-NEXT: nop61# CHECK-NEXT: cmpld 7, 12, 062# CHECK-NEXT: bt- 28, 0x1001020463 64.section .note.GNU-split-stack,"",@progbits65