83 lines · plain
1; RUN: llc -mtriple=riscv32 --code-model=small < %s \2; RUN: | FileCheck %s3; RUN: llc -mtriple=riscv32 --code-model=medium < %s \4; RUN: | FileCheck %s5; RUN: llc -mtriple=riscv32 --code-model=small -relocation-model=pic < %s \6; RUN: | FileCheck %s7; RUN: llc -mtriple=riscv32 --code-model=medium -relocation-model=pic < %s \8; RUN: | FileCheck %s9; RUN: llc -mtriple=riscv64 --code-model=small < %s \10; RUN: | FileCheck %s11; RUN: llc -mtriple=riscv64 --code-model=medium < %s \12; RUN: | FileCheck %s13; RUN: llc -mtriple=riscv64 --code-model=small -relocation-model=pic < %s \14; RUN: | FileCheck %s15; RUN: llc -mtriple=riscv64 --code-model=medium -relocation-model=pic < %s \16; RUN: | FileCheck %s17; RUN: llc -mtriple=riscv32be --code-model=small < %s \18; RUN: | FileCheck %s19; RUN: llc -mtriple=riscv32be --code-model=medium < %s \20; RUN: | FileCheck %s21; RUN: llc -mtriple=riscv32be --code-model=small -relocation-model=pic < %s \22; RUN: | FileCheck %s23; RUN: llc -mtriple=riscv32be --code-model=medium -relocation-model=pic < %s \24; RUN: | FileCheck %s25; RUN: llc -mtriple=riscv64be --code-model=small < %s \26; RUN: | FileCheck %s27; RUN: llc -mtriple=riscv64be --code-model=medium < %s \28; RUN: | FileCheck %s29; RUN: llc -mtriple=riscv64be --code-model=small -relocation-model=pic < %s \30; RUN: | FileCheck %s31; RUN: llc -mtriple=riscv64be --code-model=medium -relocation-model=pic < %s \32; RUN: | FileCheck %s33 34declare void @throw_exception()35 36declare i32 @__gxx_personality_v0(...)37 38declare ptr @__cxa_begin_catch(ptr)39 40declare void @__cxa_end_catch()41 42; CHECK-LABEL: test1:43; CHECK: .cfi_startproc44; PersonalityEncoding = DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata445; CHECK-NEXT: .cfi_personality 155, DW.ref.__gxx_personality_v046; LSDAEncoding = DW_EH_PE_pcrel | DW_EH_PE_sdata447; CHECK-NEXT: .cfi_lsda 27, .Lexception048 49define void @test1() personality ptr @__gxx_personality_v0 {50entry:51 invoke void @throw_exception() to label %try.cont unwind label %lpad52 53lpad:54 %0 = landingpad { ptr, i32 }55 catch ptr null56 %1 = extractvalue { ptr, i32 } %0, 057 %2 = tail call ptr @__cxa_begin_catch(ptr %1)58 tail call void @__cxa_end_catch()59 br label %try.cont60 61try.cont:62 ret void63}64 65; CHECK-LABEL: GCC_except_table0:66; CHECK-NEXT: .Lexception0:67; CHECK-NEXT: .byte 255 # @LPStart Encoding = omit68; TTypeEncoding = DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata469; CHECK-NEXT: .byte 155 # @TType Encoding = indirect pcrel sdata470; CHECK: .Lttbaseref0:71; CallSiteEncoding = dwarf::DW_EH_PE_udata472; CHECK-NEXT: .byte 3 # Call site Encoding = udata473; CHECK-NEXT: .uleb128 .Lcst_end0-.Lcst_begin074; CHECK-NEXT: cst_begin0:75; CHECK-NEXT: .word .Ltmp0-.Lfunc_begin0 # >> Call Site 1 <<76; CHECK-NEXT: .word .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp177; CHECK-NEXT: .word .Ltmp2-.Lfunc_begin0 # jumps to .Ltmp278; CHECK-NEXT: .byte 1 # On action: 179; CHECK-NEXT: .word .Ltmp1-.Lfunc_begin0 # >> Call Site 2 <<80; CHECK-NEXT: .word .Lfunc_end0-.Ltmp1 # Call between .Ltmp1 and .Lfunc_end081; CHECK-NEXT: .word 0 # has no landing pad82; CHECK-NEXT: .byte 0 # On action: cleanup83