Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / x86-64-split-stack-prologue-adjust-shared.s
blobab4b56b67e47fe98842b691e8f9c6ea20ad39b78
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/x86-64-split-stack-extra.s -o %t2.o
3 # RUN: ld.lld --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 %t2.o -o %t4.so -shared
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
6 # RUN: ld.lld --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 %t1.o %t4.so -o %t
7 # RUN: llvm-objdump -d %t | FileCheck %s
9 # For a cross .so call, make sure lld produced the conservative call to __morestack_non_split.
10 # CHECK: <prologue1_cross_so_call>:
11 # CHECK-NEXT: stc{{.*$}}
12 # CHECK-NEXT: nopl{{.*$}}
13 # CHECK: jae{{.*$}}
14 # CHECK-NEXT: callq{{.*}}<__morestack_non_split>
16 .text
18 .global prologue1_cross_so_call
19 .type prologue1_cross_so_call,@function
20 prologue1_cross_so_call:
21 cmp %fs:0x70,%rsp
22 jae 1f
23 callq __morestack
24 retq
26 callq split
27 retq
28 .size prologue1_cross_so_call,. - prologue1_cross_so_call
30 .section .note.GNU-stack,"",@progbits
31 .section .note.GNU-split-stack,"",@progbits