summaryrefslogtreecommitdiff
path: root/test/native/arm-linux-eabi/ttype-encoding-00.pass.sh.s
blob: 2c9f720a4d8d864beca01ba07f390dc225576c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@ RUN: %cxx %flags %link_flags %s -o %t.exe
@ RUN: %exec %t.exe

@ PURPOSE: Check that 0x00 is a valid value for ttype encoding.  LLVM and
@ GCC 4.6 are generating 0x00 as ttype encoding.  libc++abi should provide
@ legacy support.

@ NOTE:
@
@ This file is generated from the following C++ source code:
@
@ ```
@ int main() {
@   try {
@     throw 5;
@   } catch (int i) {
@     if (i != 5)
@       abort();
@     return 0;
@   }
@ }
@ ```

	.syntax unified

	.text
	.globl	main
	.p2align	2
	.type	main,%function
main:                                   @ @main
.Lfunc_begin0:
	.fnstart
@ BB#0:                                 @ %entry
	.save	{r11, lr}
	push	{r11, lr}
	.setfp	r11, sp
	mov	r11, sp
	mov	r0, #4
	bl	__cxa_allocate_exception
	mov	r1, #5
	str	r1, [r0]
.Ltmp0:
	ldr	r1, .LCPI0_0
	mov	r2, #0
	bl	__cxa_throw
.Ltmp1:

@ BB#2:                                 @ %lpad
.Ltmp2:
	bl	__cxa_begin_catch
	ldr	r0, [r0]
	cmp	r0, #5
	bne	.LBB0_4
@ BB#3:                                 @ %if.end
	bl	__cxa_end_catch
	mov	r0, #0
	pop	{r11, lr}
	bx	lr
.LBB0_4:                                @ %if.then
	bl	abort
	.p2align	2
@ BB#5:
.LCPI0_0:
	.long	_ZTIi
.Lfunc_end0:

	.size	main, .Lfunc_end0-main
	.globl	__gxx_personality_v0
	.personality __gxx_personality_v0
	.handlerdata
	.p2align	2
GCC_except_table0:
.Lexception0:
	.byte	255                     @ @LPStart Encoding = omit
	.byte	0                       @ @TType Encoding = absptr
	.asciz	"\257\200"              @ @TType base offset
	.byte	3                       @ Call site Encoding = udata4
	.byte	39                      @ Call site table length
	.long	.Lfunc_begin0-.Lfunc_begin0 @ >> Call Site 1 <<
	.long	.Ltmp0-.Lfunc_begin0    @   Call between .Lfunc_begin0 and .Ltmp0
	.long	0                       @     has no landing pad
	.byte	0                       @   On action: cleanup
	.long	.Ltmp0-.Lfunc_begin0    @ >> Call Site 2 <<
	.long	.Ltmp1-.Ltmp0           @   Call between .Ltmp0 and .Ltmp1
	.long	.Ltmp2-.Lfunc_begin0    @     jumps to .Ltmp2
	.byte	1                       @   On action: 1
	.long	.Ltmp1-.Lfunc_begin0    @ >> Call Site 3 <<
	.long	.Lfunc_end0-.Ltmp1      @   Call between .Ltmp1 and .Lfunc_end0
	.long	0                       @     has no landing pad
	.byte	0                       @   On action: cleanup
	.byte	1                       @ >> Action Record 1 <<
                                        @   Catch TypeInfo 1
	.byte	0                       @   No further actions
                                        @ >> Catch TypeInfos <<
	.long	_ZTIi(target2)          @ TypeInfo 1
	.p2align	2
	.fnend