blob: d6d47678590aead6649c0fcca883ddac94c0be10 [file] [log] [blame]
Daniel Sanders0d972702016-06-24 12:23:17 +00001; RUN: llc -mtriple=mipsel-linux-gnu < %s -asm-verbose -relocation-model=pic | FileCheck -check-prefixes=ALL,O32 %s
2; RUN: llc -mtriple=mipsel-linux-android < %s -asm-verbose -relocation-model=pic | FileCheck -check-prefixes=ALL,O32 %s
3; RUN: llc -mtriple=mips64el-linux-gnu -target-abi=n32 < %s -asm-verbose -relocation-model=pic | FileCheck -check-prefixes=ALL,N32 %s
4; RUN: llc -mtriple=mips64el-linux-android -target-abi=n32 < %s -asm-verbose -relocation-model=pic | FileCheck -check-prefixes=ALL,N32 %s
5; RUN: llc -mtriple=mips64el-linux-gnu < %s -asm-verbose -relocation-model=pic | FileCheck -check-prefixes=ALL,N64 %s
6; RUN: llc -mtriple=mips64el-linux-android < %s -asm-verbose -relocation-model=pic | FileCheck -check-prefixes=ALL,N64 %s
Daniel Sandersc95f3f82015-06-02 20:32:50 +00007
8@_ZTISt9exception = external constant i8*
Logan Chienc0029812014-05-30 16:48:56 +00009
David Majnemer7fddecc2015-06-17 20:52:32 +000010define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
Daniel Sanders196390e2015-05-20 13:19:19 +000011; ALL: .cfi_startproc
12; ALL: .cfi_personality 128, DW.ref.__gxx_personality_v0
Logan Chienc0029812014-05-30 16:48:56 +000013
14entry:
15 invoke void @foo() to label %cont unwind label %lpad
Daniel Sanders196390e2015-05-20 13:19:19 +000016; ALL: foo
17; ALL: jalr
Logan Chienc0029812014-05-30 16:48:56 +000018
19lpad:
David Majnemer7fddecc2015-06-17 20:52:32 +000020 %0 = landingpad { i8*, i32 }
Daniel Sandersc95f3f82015-06-02 20:32:50 +000021 catch i8* null
22 catch i8* bitcast (i8** @_ZTISt9exception to i8*)
Logan Chienc0029812014-05-30 16:48:56 +000023 ret i32 0
24
25cont:
26 ret i32 0
27}
Daniel Sanders196390e2015-05-20 13:19:19 +000028; ALL: .cfi_endproc
Logan Chienc0029812014-05-30 16:48:56 +000029
30declare i32 @__gxx_personality_v0(...)
31
32declare void @foo()
33
Daniel Sandersc95f3f82015-06-02 20:32:50 +000034; ALL: GCC_except_table{{[0-9]+}}:
35; ALL: .byte 155 # @TType Encoding = indirect pcrel sdata4
36; ALL: $[[PC_LABEL:tmp[0-9]+]]:
37; ALL: .4byte ($_ZTISt9exception.DW.stub)-($[[PC_LABEL]])
38; ALL: $_ZTISt9exception.DW.stub:
39; O32: .4byte _ZTISt9exception
40; N32: .4byte _ZTISt9exception
41; N64: .8byte _ZTISt9exception
Daniel Sanders196390e2015-05-20 13:19:19 +000042; ALL: .hidden DW.ref.__gxx_personality_v0
43; ALL: .weak DW.ref.__gxx_personality_v0
44; ALL: .section .data.DW.ref.__gxx_personality_v0,"aGw",@progbits,DW.ref.__gxx_personality_v0,comdat
Dan Gohman61d15ae2016-01-26 00:03:25 +000045; O32: .p2align 2
46; N32: .p2align 2
47; N64: .p2align 3
Daniel Sanders196390e2015-05-20 13:19:19 +000048; ALL: .type DW.ref.__gxx_personality_v0,@object
49; O32: .size DW.ref.__gxx_personality_v0, 4
50; N32: .size DW.ref.__gxx_personality_v0, 4
51; N64: .size DW.ref.__gxx_personality_v0, 8
52; ALL: DW.ref.__gxx_personality_v0:
53; O32: .4byte __gxx_personality_v0
54; N32: .4byte __gxx_personality_v0
55; N64: .8byte __gxx_personality_v0