mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 16:29:20 +00:00
As pointed out by Rafael Espindola, we should match the DWARF encodings produced by GCC in both pic and non-pic modes. This was not the case for the non-pic case. This patch changes all DWARF encodings to DW_EH_PE_absptr for the non-pic case, just like GCC does. The test case is updated to check for both variants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181222 91177308-0d34-0410-b5e6-96231b3b80d8
46 lines
1.7 KiB
LLVM
46 lines
1.7 KiB
LLVM
; 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 -relocation-model=pic | 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 0, __gxx_personality_v0
|
|
; CHECK-FUNC: .cfi_lsda 0, .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: .cfi_personality 155, DW.ref.__gxx_personality_v0
|
|
; CHECK-REF: .cfi_lsda 27, .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
|