1 # This test checks that trampolines are inserted in split fragments if
2 # necessary. There are 4 LSDA ranges with a landing pad to three landing pads.
3 # After splitting all blocks, there have to be 4 trampolines in the output.
5 # RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %s -o %t.o
6 # RUN: %clangxx %cxxflags %t.o -o %t.exe -Wl,-q -pie
7 # RUN: llvm-bolt %t.exe --split-functions --split-strategy=all --split-eh \
8 # RUN: -o %t.bolt --print-split --print-only=main 2>&1 | FileCheck %s
10 # CHECK: ------- HOT-COLD SPLIT POINT -------
12 # CHECK: Landing Pads: .LBB0
14 # CHECK-NEXT: Landing Pad
15 # CHECK: ------- HOT-COLD SPLIT POINT -------
17 # CHECK: Landing Pads: .LBB1, .LBB2
19 # CHECK-NEXT: Landing Pad
21 # CHECK-NEXT: Landing Pad
22 # CHECK: ------- HOT-COLD SPLIT POINT -------
23 # CHECK: ------- HOT-COLD SPLIT POINT -------
24 # CHECK: ------- HOT-COLD SPLIT POINT -------
25 # CHECK: ------- HOT-COLD SPLIT POINT -------
26 # CHECK: ------- HOT-COLD SPLIT POINT -------
28 # CHECK: Landing Pads: .LBB3
30 # CHECK-NEXT: Landing Pad
31 # CHECK: ------- HOT-COLD SPLIT POINT -------
32 # CHECK: ------- HOT-COLD SPLIT POINT -------
35 .section .rodata.str1.1,"aMS",@progbits,1
46 .cfi_personality 0x9b,DW.ref.__gxx_personality_v0
47 .cfi_lsda 0x1b,.LLSDA1265
49 .cfi_def_cfa_offset 16
52 .cfi_def_cfa_offset 24
55 .cfi_def_cfa_offset 32
67 call __cxa_allocate_exception@PLT
72 call _ZNSt13runtime_errorC1EPKc@PLT
75 movq _ZNSt13runtime_errorD1Ev@GOTPCREL
(%rip
), %rdx
76 movq _ZTISt13runtime_error@GOTPCREL
(%rip
), %rsi
90 call __cxa_free_exception@PLT
97 call _Unwind_Resume@PLT
100 call __cxa_begin_catch@PLT
109 call __cxa_end_catch@PLT
114 .cfi_def_cfa_offset 24
116 .cfi_def_cfa_offset 16
118 .cfi_def_cfa_offset 8
123 call __cxa_end_catch@PLT
126 call _Unwind_Resume@PLT
129 .globl __gxx_personality_v0
130 .section .gcc_except_table,"a",@progbits
135 .uleb128 .LLSDATT1265-.LLSDATTD1265
138 .uleb128 .LLSDACSE1265-.LLSDACSB1265
140 .uleb128 .LEHB0-.LFB1265
141 .uleb128 .LEHE0-.LEHB0
142 .uleb128 .L9-.LFB1265
144 .uleb128 .LEHB1-.LFB1265
145 .uleb128 .LEHE1-.LEHB1
146 .uleb128 .L8-.LFB1265
148 .uleb128 .LEHB2-.LFB1265
149 .uleb128 .LEHE2-.LEHB2
150 .uleb128 .L9-.LFB1265
152 .uleb128 .LEHB3-.LFB1265
153 .uleb128 .LEHE3-.LEHB3
156 .uleb128 .LEHB4-.LFB1265
157 .uleb128 .LEHE4-.LEHB4
158 .uleb128 .L10-.LFB1265
160 .uleb128 .LEHB5-.LFB1265
161 .uleb128 .LEHE5-.LEHB5
170 .long DW.ref._ZTISt13runtime_error-.
174 .hidden DW.ref._ZTISt13runtime_error
175 .weak DW.ref._ZTISt13runtime_error
176 .section .data.rel.local.DW.ref._ZTISt13runtime_error,"awG",@progbits,DW.ref._ZTISt13runtime_error,comdat
178 .type DW.ref._ZTISt13runtime_error, @object
179 .size DW.ref._ZTISt13runtime_error, 8
180 DW.ref._ZTISt13runtime_error
:
181 .quad _ZTISt13runtime_error
182 .hidden DW.ref.__gxx_personality_v0
183 .weak DW.ref.__gxx_personality_v0
184 .section .data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
186 .type DW.ref.__gxx_personality_v0, @object
187 .size DW.ref.__gxx_personality_v0, 8
188 DW.ref.__gxx_personality_v0
:
189 .quad __gxx_personality_v0
190 .ident "GCC: (Compiler-Explorer-Build-gcc--binutils-2.38) 12.1.0"
191 .section .note.GNU-stack,"",@progbits