brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · c89eed4 Raw
61 lines · plain
1; ARM EHABI test for the handlerdata.2 3; This test case checks whether the handlerdata for exception4; handling is generated properly.5;6; (1) The handlerdata must not be empty.7; (2) LPStartEncoding == DW_EH_PE_omit8; (3) TTypeEncoding == DW_EH_PE_absptr9; (4) CallSiteEncoding == DW_EH_PE_udata410 11; RUN: llc -mtriple arm-unknown-linux-gnueabi -filetype=asm -o - %s \12; RUN:   | FileCheck %s13 14; RUN: llc -mtriple arm-unknown-linux-gnueabi -filetype=asm -o - %s \15; RUN:     -relocation-model=pic \16; RUN:   | FileCheck %s17 18declare void @throw_exception()19 20declare i32 @__gxx_personality_v0(...)21 22declare ptr @__cxa_begin_catch(ptr)23 24declare void @__cxa_end_catch()25 26define void @test1() personality ptr @__gxx_personality_v0 {27entry:28  invoke void @throw_exception() to label %try.cont unwind label %lpad29 30lpad:31  %0 = landingpad { ptr, i32 }32          catch ptr null33  %1 = extractvalue { ptr, i32 } %0, 034  %2 = tail call ptr @__cxa_begin_catch(ptr %1)35  tail call void @__cxa_end_catch()36  br label %try.cont37 38try.cont:39  ret void40}41 42; CHECK:   .globl test143; CHECK:   .p2align 244; CHECK:   .type test1,%function45; CHECK-LABEL: test1:46; CHECK:   .fnstart47; CHECK:   .personality __gxx_personality_v048; CHECK:   .handlerdata49; CHECK:   .p2align 250; CHECK-LABEL: GCC_except_table0:51; CHECK-LABEL: .Lexception0:52; CHECK:   .byte 255                     @ @LPStart Encoding = omit53; CHECK:   .byte 0                       @ @TType Encoding = absptr54; CHECK:   .uleb128 .Lttbase55; CHECK:   .byte 1                       @ Call site Encoding = uleb12856; CHECK:   .uleb128 .Lcst_end57; CHECK:   .uleb12858; CHECK:   .uleb12859; CHECK:   .uleb12860; CHECK:   .fnend61