1 ; RUN: llc -mtriple=mipsel-linux-gnu < %s -asm-verbose -relocation-model=pic | \
2 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-O32,O32 %s
3 ; RUN: llc -mtriple=mipsel-linux-android < %s -asm-verbose -relocation-model=pic | \
4 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-O32,O32 %s
5 ; RUN: llc -mtriple=mips64el-linux-gnu -target-abi=n32 < %s -asm-verbose -relocation-model=pic | \
6 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-NEW,N32 %s
7 ; RUN: llc -mtriple=mips64el-linux-gnu < %s -asm-verbose -relocation-model=pic | \
8 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-NEW,N64 %s
9 ; RUN: llc -mtriple=mips64el-linux-android < %s -asm-verbose -relocation-model=pic | \
10 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-NEW,N64 %s
11 ; RUN: llc -mtriple=mips64el-linux-gnu < %s -asm-verbose -relocation-model=pic | \
12 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-NEW,N64 %s
13 ; RUN: llc -mtriple=mips-unknown-freebsd11.0 < %s -asm-verbose -relocation-model=pic | \
14 ; RUN: FileCheck -check-prefixes=ALL,FREEBSD,FREEBSD-O32,O32 %s
15 ; RUN: llc -mtriple=mips64-unknown-freebsd11.0 < %s -asm-verbose -relocation-model=pic | \
16 ; RUN: FileCheck -check-prefixes=ALL,FREEBSD,FREEBSD-NEW,N64 %s
18 @_ZTISt9exception = external constant i8*
20 define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
23 ; Linux must rely on the assembler/linker converting the encodings.
24 ; LINUX: .cfi_personality 128, DW.ref.__gxx_personality_v0
25 ; LINUX-O32: .cfi_lsda 0, $exception0
26 ; LINUX-NEW: .cfi_lsda 0, .Lexception0
28 ; FreeBSD can (and must) be more direct about the encodings it wants.
29 ; FREEBSD: .cfi_personality 155, DW.ref.__gxx_personality_v0
30 ; FREEBSD-O32: .cfi_lsda 27, $exception0
31 ; FREEBSD-NEW: .cfi_lsda 27, .Lexception0
34 invoke void @foo() to label %cont unwind label %lpad
39 %0 = landingpad { i8*, i32 }
41 catch i8* bitcast (i8** @_ZTISt9exception to i8*)
49 declare i32 @__gxx_personality_v0(...)
53 ; ALL: GCC_except_table{{[0-9]+}}:
54 ; ALL: .byte 155 # @TType Encoding = indirect pcrel sdata4
55 ; O32: [[PC_LABEL:\$tmp[0-9]+]]:
56 ; N32: [[PC_LABEL:\.Ltmp[0-9]+]]:
57 ; N64: [[PC_LABEL:\.Ltmp[0-9]+]]:
58 ; O32: .4byte ($_ZTISt9exception.DW.stub)-([[PC_LABEL]])
59 ; N32: .4byte .L_ZTISt9exception.DW.stub-[[PC_LABEL]]
60 ; N64: .4byte .L_ZTISt9exception.DW.stub-[[PC_LABEL]]
61 ; O32: $_ZTISt9exception.DW.stub:
62 ; N32: .L_ZTISt9exception.DW.stub:
63 ; N64: .L_ZTISt9exception.DW.stub:
64 ; O32: .4byte _ZTISt9exception
65 ; N32: .4byte _ZTISt9exception
66 ; N64: .8byte _ZTISt9exception
67 ; ALL: .hidden DW.ref.__gxx_personality_v0
68 ; ALL: .weak DW.ref.__gxx_personality_v0
69 ; ALL: .section .data.DW.ref.__gxx_personality_v0,"aGw",@progbits,DW.ref.__gxx_personality_v0,comdat
73 ; ALL: .type DW.ref.__gxx_personality_v0,@object
74 ; O32: .size DW.ref.__gxx_personality_v0, 4
75 ; N32: .size DW.ref.__gxx_personality_v0, 4
76 ; N64: .size DW.ref.__gxx_personality_v0, 8
77 ; ALL: DW.ref.__gxx_personality_v0:
78 ; O32: .4byte __gxx_personality_v0
79 ; N32: .4byte __gxx_personality_v0
80 ; N64: .8byte __gxx_personality_v0