blob: 837602bceab6853dd6a0252fef3253cb2530975c [file] [log] [blame]
Logan Chiencc4f5122016-11-13 14:44:41 +00001@ RUN: %cxx %flags %link_flags %s -o %t.exe
Eric Fiselierf8b91ee2017-05-10 17:52:53 +00002@ RUN: %t.exe
Asiri Rathnayake3f19f772017-02-27 15:31:34 +00003@ UNSUPPORTED: libcxxabi-no-exceptions
Logan Chiencc4f5122016-11-13 14:44:41 +00004
5@ PURPOSE: Check that 0x90 is a valid value for ttype encoding.
6
7@ NOTE:
8@
9@ This file is generated from the following C++ source code and then change the
10@ `TType Encoding` to 0x90.
11@
12@ ```
13@ int main() {
14@ try {
15@ throw 5;
16@ } catch (int i) {
17@ if (i != 5)
18@ abort();
19@ return 0;
20@ }
21@ }
22@ ```
23
24 .syntax unified
25
26 .text
27 .globl main
28 .p2align 2
29 .type main,%function
30main: @ @main
31.Lfunc_begin0:
32 .fnstart
33@ BB#0: @ %entry
34 .save {r11, lr}
35 push {r11, lr}
36 .setfp r11, sp
37 mov r11, sp
38 mov r0, #4
39 bl __cxa_allocate_exception
40 mov r1, #5
41 str r1, [r0]
42.Ltmp0:
43 ldr r1, .LCPI0_0
44 mov r2, #0
45 bl __cxa_throw
46.Ltmp1:
47
48@ BB#2: @ %lpad
49.Ltmp2:
50 bl __cxa_begin_catch
51 ldr r0, [r0]
52 cmp r0, #5
53 bne .LBB0_4
54@ BB#3: @ %if.end
55 bl __cxa_end_catch
56 mov r0, #0
57 pop {r11, lr}
58 bx lr
59.LBB0_4: @ %if.then
60 bl abort
61 .p2align 2
62@ BB#5:
63.LCPI0_0:
64 .long _ZTIi
65.Lfunc_end0:
66
67 .size main, .Lfunc_end0-main
68 .globl __gxx_personality_v0
69 .personality __gxx_personality_v0
70 .handlerdata
71 .p2align 2
72GCC_except_table0:
73.Lexception0:
74 .byte 255 @ @LPStart Encoding = omit
75 .byte 0x90 @ @TType Encoding = indirect | pcrel
76 .asciz "\257\200" @ @TType base offset
77 .byte 3 @ Call site Encoding = udata4
78 .byte 39 @ Call site table length
79 .long .Lfunc_begin0-.Lfunc_begin0 @ >> Call Site 1 <<
80 .long .Ltmp0-.Lfunc_begin0 @ Call between .Lfunc_begin0 and .Ltmp0
81 .long 0 @ has no landing pad
82 .byte 0 @ On action: cleanup
83 .long .Ltmp0-.Lfunc_begin0 @ >> Call Site 2 <<
84 .long .Ltmp1-.Ltmp0 @ Call between .Ltmp0 and .Ltmp1
85 .long .Ltmp2-.Lfunc_begin0 @ jumps to .Ltmp2
86 .byte 1 @ On action: 1
87 .long .Ltmp1-.Lfunc_begin0 @ >> Call Site 3 <<
88 .long .Lfunc_end0-.Ltmp1 @ Call between .Ltmp1 and .Lfunc_end0
89 .long 0 @ has no landing pad
90 .byte 0 @ On action: cleanup
91 .byte 1 @ >> Action Record 1 <<
92 @ Catch TypeInfo 1
93 .byte 0 @ No further actions
94 @ >> Catch TypeInfos <<
95 .long _ZTIi(target2) @ TypeInfo 1
96 .p2align 2
97 .fnend