Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / libcxxabi / test / native / x86_64 / lpstart-zero.pass.sh.s
blobe18134cf886391de1263b39fd7f2ff1fcdc1dc9e
1 # RUN: %{cxx} %{flags} %s %{link_flags} -no-pie -o %t.exe
2 # RUN: %{exec} %t.exe
4 # REQUIRES: linux && target={{x86_64-.+}}
5 # UNSUPPORTED: target={{.+-android.*}}
6 # UNSUPPORTED: no-exceptions
8 ## Check that libc++abi works correctly when LPStart address is explicitly set
9 ## to zero.
11 ## This file is generated from the following C++ source code.
13 ## ```
14 ## int main() {
15 ## try {
16 ## throw 42;
17 ## } catch (...) {
18 ## return 0;
19 ## }
20 ## return 1;
21 ## }
22 ## ```
23 ## The exception table is modified to use udata4 encoding for LPStart and
24 ## sdata4 encoding for call sites.
26 .text
27 .globl main # -- Begin function main
28 .p2align 4, 0x90
29 .type main,@function
30 main: # @main
31 .Lfunc_begin0:
32 .cfi_startproc
33 .globl __gxx_personality_v0
34 .cfi_personality 3, __gxx_personality_v0
35 .cfi_lsda 27, .Lexception0
36 # %bb.0: # %entry
37 pushq %rbp
38 .cfi_def_cfa_offset 16
39 .cfi_offset %rbp, -16
40 movq %rsp, %rbp
41 .cfi_def_cfa_register %rbp
42 subq $32, %rsp
43 movl $0, -4(%rbp)
44 movl $4, %edi
45 callq __cxa_allocate_exception@PLT
46 movq %rax, %rdi
47 movl $42, (%rdi)
48 .Ltmp0:
49 movq _ZTIi@GOTPCREL(%rip), %rsi
50 xorl %eax, %eax
51 movl %eax, %edx
52 callq __cxa_throw@PLT
53 .Ltmp1:
54 jmp .LBB0_4
55 .LBB0_1: # %lpad
56 .Ltmp2:
57 movq %rax, %rcx
58 movl %edx, %eax
59 movq %rcx, -16(%rbp)
60 movl %eax, -20(%rbp)
61 # %bb.2: # %catch
62 movq -16(%rbp), %rdi
63 callq __cxa_begin_catch@PLT
64 movl $0, -4(%rbp)
65 callq __cxa_end_catch@PLT
66 # %bb.3: # %return
67 movl -4(%rbp), %eax
68 addq $32, %rsp
69 popq %rbp
70 .cfi_def_cfa %rsp, 8
71 retq
72 .LBB0_4: # %unreachable
73 .Lfunc_end0:
74 .size main, .Lfunc_end0-main
75 .cfi_endproc
77 .section .gcc_except_table,"a",@progbits
78 .p2align 2, 0x0
79 GCC_except_table0:
80 .Lexception0:
81 .byte 3 # @LPStart Encoding = udata4
82 .long 0
83 .byte 155 # @TType Encoding = indirect pcrel sdata4
84 .uleb128 .Lttbase0-.Lttbaseref0
85 .Lttbaseref0:
86 .byte 11 # Call site Encoding = sdata4
87 .uleb128 .Lcst_end0-.Lcst_begin0
88 .Lcst_begin0:
89 .long .Lfunc_begin0-.Lfunc_begin0 # >> Call Site 1 <<
90 .long .Ltmp0-.Lfunc_begin0 # Call between .Lfunc_begin0 and .Ltmp0
91 .long 0 # has no landing pad
92 .byte 0 # On action: cleanup
93 .long .Ltmp0-.Lfunc_begin0 # >> Call Site 2 <<
94 .long .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp1
95 .long .Ltmp2
96 .byte 1 # On action: 1
97 .long .Ltmp1-.Lfunc_begin0 # >> Call Site 3 <<
98 .long .Lfunc_end0-.Ltmp1 # Call between .Ltmp1 and .Lfunc_end0
99 .long 0 # has no landing pad
100 .byte 0 # On action: cleanup
101 .Lcst_end0:
102 .byte 1 # >> Action Record 1 <<
103 # Catch TypeInfo 1
104 .byte 0 # No further actions
105 .p2align 2, 0x0
106 # >> Catch TypeInfos <<
107 .long 0 # TypeInfo 1
108 .Lttbase0:
109 .p2align 2, 0x0
110 # -- End function