aboutsummaryrefslogtreecommitdiff
path: root/test/DebugInfo/SystemZ/eh_frame_personality.ll
blob: e5dbb15bc0d85779a3eaf49c88490c9f0f374669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck -check-prefix=CHECK-FUNC %s
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck -check-prefix=CHECK-ET %s
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck -check-prefix=CHECK-REF %s

declare i32 @__gxx_personality_v0(...)

declare void @bar()

define i64 @foo(i64 %lhs, i64 %rhs) {
  invoke void @bar() to label %end unwind label %clean
end:
 ret i64 0

clean:
  %tst = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup
  ret i64 42
}

; CHECK-FUNC: foo:
; CHECK-FUNC: .cfi_startproc
; CHECK-FUNC: .cfi_personality 155, DW.ref.__gxx_personality_v0
; CHECK-FUNC: .cfi_lsda 27, .Lexception0
; CHECK-FUNC: stmg	%r14, %r15, 112(%r15)
; CHECK-FUNC: .cfi_offset %r14, -48
; CHECK-FUNC: .cfi_offset %r15, -40
; CHECK-FUNC: aghi	%r15, -160
; CHECK-FUNC: .cfi_def_cfa_offset 320
; ...main function...
; CHECK-FUNC: .cfi_endproc
;
; CHECK-ET: .section	.gcc_except_table,"a",@progbits
; CHECK-ET-NEXT: .align	4
; CHECK-ET-NEXT: GCC_except_table0:
; CHECK-ET-NEXT: .Lexception0:
;
; CHECK-REF: .hidden	DW.ref.__gxx_personality_v0
; CHECK-REF: .weak	DW.ref.__gxx_personality_v0
; CHECK-REF: .section	.data.DW.ref.__gxx_personality_v0,"aGw",@progbits,DW.ref.__gxx_personality_v0,comdat
; CHECK-REF-NEXT: .align	8
; CHECK-REF-NEXT: .type	DW.ref.__gxx_personality_v0,@object
; CHECK-REF-NEXT: .size	DW.ref.__gxx_personality_v0, 8
; CHECK-REF-NEXT: DW.ref.__gxx_personality_v0:
; CHECK-REF-NEXT: .quad	__gxx_personality_v0