• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: ppc
2
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
5
6# RUN: not ld.lld --defsym __morestack=0x10010000 %t1.o %t2.o -o /dev/null 2>&1 | FileCheck %s
7
8# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t1.o
9# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/ppc64-no-split-stack.s -o %t2.o
10
11# RUN: not ld.lld --defsym __morestack=0x10010000 %t1.o %t2.o -o /dev/null 2>&1 | FileCheck %s
12
13# CHECK: error: {{.*}}.o:(.text): wrong_regs (with -fsplit-stack) calls nss_callee (without -fsplit-stack), but couldn't adjust its prologue
14
15        .abiversion 2
16        .section    ".text"
17
18        .p2align 2
19        .global wrong_regs
20        .type wrong_regs, @function
21
22wrong_regs:
23.Lwr_gep:
24    addis 2, 12, .TOC.-.Lwr_gep@ha
25    addi 2, 2, .TOC.-.Lwr_gep@l
26    .localentry wrong_regs, .-wrong_regs
27    ld 0, -0x7040(13)
28    addis 5, 2, -1
29    addi  5, 5, -32
30    addi 12, 1, -32
31    nop
32    cmpld 7, 12, 0
33    blt- 7, .Lwr_alloc_more
34.Lwr_body:
35    mflr 0
36    std 0, 16(1)
37    stdu 1, -32(1)
38    bl nss_callee
39    addi 1, 1, 32
40    ld 0, 16(1)
41    mtlr 0
42    blr
43.Lwr_alloc_more:
44    mflr 0
45    std 0, 16(1)
46    bl __morestack
47    ld 0, 16(1)
48    mtlr 0
49    blr
50    b .Lwr_body
51        .size wrong_regs, .-wrong_regs
52
53        .section        .note.GNU-split-stack,"",@progbits
54