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=mips64el-linux-gnu -target-abi=n32 < %s -asm-verbose -relocation-model=pic | \
4 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-NEW,N32 %s
5 ; RUN: llc -mtriple=mips64el-linux-gnu < %s -asm-verbose -relocation-model=pic | \
6 ; RUN: FileCheck -check-prefixes=ALL,LINUX,LINUX-NEW,N64 %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=mips-unknown-freebsd11.0 < %s -asm-verbose -relocation-model=pic | \
10 ; RUN: FileCheck -check-prefixes=ALL,FREEBSD,FREEBSD-O32,O32 %s
11 ; RUN: llc -mtriple=mips64-unknown-freebsd11.0 < %s -asm-verbose -relocation-model=pic | \
12 ; RUN: FileCheck -check-prefixes=ALL,FREEBSD,FREEBSD-NEW,N64 %s
14 @_ZTISt9exception = external constant ptr
16 define i32 @main() personality ptr @__gxx_personality_v0 {
19 ; Linux must rely on the assembler/linker converting the encodings.
20 ; LINUX: .cfi_personality 155, DW.ref.__gxx_personality_v0
21 ; LINUX-O32: .cfi_lsda 27, $exception0
22 ; LINUX-NEW: .cfi_lsda 27, .Lexception0
24 ; FreeBSD can (and must) be more direct about the encodings it wants.
25 ; FREEBSD: .cfi_personality 155, DW.ref.__gxx_personality_v0
26 ; FREEBSD-O32: .cfi_lsda 27, $exception0
27 ; FREEBSD-NEW: .cfi_lsda 27, .Lexception0
30 invoke void @foo() to label %cont unwind label %lpad
35 %0 = landingpad { ptr, i32 }
37 catch ptr @_ZTISt9exception
45 declare i32 @__gxx_personality_v0(...)
49 ; ALL: GCC_except_table{{[0-9]+}}:
50 ; ALL: .byte 155 # @TType Encoding = indirect pcrel sdata4
51 ; O32: [[PC_LABEL:\$tmp[0-9]+]]:
52 ; N32: [[PC_LABEL:\.Ltmp[0-9]+]]:
53 ; N64: [[PC_LABEL:\.Ltmp[0-9]+]]:
54 ; O32: .4byte ($_ZTISt9exception.DW.stub)-([[PC_LABEL]])
55 ; N32: .4byte .L_ZTISt9exception.DW.stub-[[PC_LABEL]]
56 ; N64: .4byte .L_ZTISt9exception.DW.stub-[[PC_LABEL]]
57 ; O32: $_ZTISt9exception.DW.stub:
58 ; N32: .L_ZTISt9exception.DW.stub:
59 ; N64: .L_ZTISt9exception.DW.stub:
60 ; O32: .4byte _ZTISt9exception
61 ; N32: .4byte _ZTISt9exception
62 ; N64: .8byte _ZTISt9exception
63 ; ALL: .hidden DW.ref.__gxx_personality_v0
64 ; ALL: .weak DW.ref.__gxx_personality_v0
65 ; ALL: .section .data.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
69 ; ALL: .type DW.ref.__gxx_personality_v0,@object
70 ; O32: .size DW.ref.__gxx_personality_v0, 4
71 ; N32: .size DW.ref.__gxx_personality_v0, 4
72 ; N64: .size DW.ref.__gxx_personality_v0, 8
73 ; ALL: DW.ref.__gxx_personality_v0:
74 ; O32: .4byte __gxx_personality_v0
75 ; N32: .4byte __gxx_personality_v0
76 ; N64: .8byte __gxx_personality_v0