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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
; This file contains exception section testing for when debug information is present.
; The 32-bit test should not print exception auxilliary entries because they are a 64-bit only feature.
; Exception auxilliary entries are present in the 64-bit tests because 64-bit && debug enabled are the requirements.
; RUN: llc -mtriple=powerpc-ibm-aix-xcoff -filetype=obj -o %t_32.o < %s
; RUN: llvm-readobj --syms %t_32.o | FileCheck %s --check-prefix=SYMS32
; RUN: llc -mtriple=powerpc64-unknown-aix -filetype=obj -o %t_32.o < %s
; RUN: llvm-readobj --syms %t_32.o | FileCheck %s --check-prefix=SYMS64
; If any debug information is included in a module and is XCOFF64, exception auxilliary entries are emitted
!llvm.module.flags = !{!0, !1}
!llvm.dbg.cu = !{!2}
!0 = !{i32 2, !"Dwarf Version", i32 3}
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = distinct !DICompileUnit(language: DW_LANG_Fortran95, file: !3, producer: "ASTI IR translator", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false)
!3 = !DIFile(filename: "t.f", directory: ".")
!4 = distinct !DISubprogram(name: "test__trap_annotation_debug", linkageName: "test__trap_annotation_debug", scope: !3, file: !3, line: 1, type: !5, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !6)
!5 = !DISubroutineType(types: !6)
!6 = !{}
!7 = !DILocation(line: 4, column: 1, scope: !4)
!8 = !{!"ppc-trap-reason", !"1", !"2"}
declare void @llvm.ppc.trap(i32 %a)
define dso_local void @sub_test() {
call void @llvm.ppc.trap(i32 1), !annotation !8
ret void
}
define dso_local void @test__trap_annotation_debug(i32 %a) !dbg !4 {
call void @llvm.ppc.trap(i32 %a), !annotation !8
call void @sub_test()
call void @llvm.ppc.trap(i32 %a), !annotation !8
ret void
}
; SYMS32: Index: [[#IND:]]{{.*}}{{[[:space:]] *}}Name: .sub_test
; SYMS32-NEXT: Value (RelocatableAddress): 0x0
; SYMS32-NEXT: Section: .text
; SYMS32-NEXT: Type: 0x20
; SYMS32-NEXT: StorageClass: C_EXT (0x2)
; SYMS32-NEXT: NumberOfAuxEntries: 2
; SYMS32-NEXT: Function Auxiliary Entry {
; SYMS32-NEXT: Index: [[#IND+1]]
; SYMS32-NEXT: OffsetToExceptionTable: 0x2A8
; SYMS32-NEXT: SizeOfFunction: 0xC
; SYMS32-NEXT: PointerToLineNum: 0x0
; SYMS32-NEXT: SymbolIndexOfNextBeyond: [[#IND+3]]
; SYMS32-NEXT: }
; SYMS32-NEXT: CSECT Auxiliary Entry {
; SYMS32-NEXT: Index: [[#IND+2]]
; SYMS32-NEXT: ContainingCsectSymbolIndex: 1
; SYMS32-NEXT: ParameterHashIndex: 0x0
; SYMS32-NEXT: TypeChkSectNum: 0x0
; SYMS32-NEXT: SymbolAlignmentLog2: 0
; SYMS32-NEXT: SymbolType: XTY_LD (0x2)
; SYMS32-NEXT: StorageMappingClass: XMC_PR (0x0)
; SYMS32-NEXT: StabInfoIndex: 0x0
; SYMS32-NEXT: StabSectNum: 0x0
; SYMS32-NEXT: }
; SYMS32-NEXT: }
; SYMS32-NEXT: Symbol {
; SYMS32-NEXT: Index: [[#IND+3]]
; SYMS32-NEXT: Name: .test__trap_annotation
; SYMS32-NEXT: Value (RelocatableAddress): 0x28
; SYMS32-NEXT: Section: .text
; SYMS32-NEXT: Type: 0x20
; SYMS32-NEXT: StorageClass: C_EXT (0x2)
; SYMS32-NEXT: NumberOfAuxEntries: 2
; SYMS32-NEXT: Function Auxiliary Entry {
; SYMS32-NEXT: Index: [[#IND+4]]
; SYMS32-NEXT: OffsetToExceptionTable: 0x2B4
; SYMS32-NEXT: SizeOfFunction: 0x34
; SYMS32-NEXT: PointerToLineNum: 0x0
; SYMS32-NEXT: SymbolIndexOfNextBeyond: [[#IND+6]]
; SYMS32-NEXT: }
; SYMS32-NEXT: CSECT Auxiliary Entry {
; SYMS32-NEXT: Index: [[#IND+5]]
; SYMS32-NEXT: ContainingCsectSymbolIndex: 1
; SYMS32-NEXT: ParameterHashIndex: 0x0
; SYMS32-NEXT: TypeChkSectNum: 0x0
; SYMS32-NEXT: SymbolAlignmentLog2: 0
; SYMS32-NEXT: SymbolType: XTY_LD (0x2)
; SYMS32-NEXT: StorageMappingClass: XMC_PR (0x0)
; SYMS32-NEXT: StabInfoIndex: 0x0
; SYMS32-NEXT: StabSectNum: 0x0
; SYMS32-NEXT: }
; SYMS32-NEXT: }
; SYMS64: Index: [[#IND:]]{{.*}}{{[[:space:]] *}}Name: .sub_test
; SYMS64-NEXT: Value (RelocatableAddress): 0x0
; SYMS64-NEXT: Section: .text
; SYMS64-NEXT: Type: 0x0
; SYMS64-NEXT: StorageClass: C_EXT (0x2)
; SYMS64-NEXT: NumberOfAuxEntries: 3
; SYMS64-NEXT: Exception Auxiliary Entry {
; SYMS64-NEXT: Index: [[#IND+1]]
; SYMS64-NEXT: OffsetToExceptionTable: 0x398
; SYMS64-NEXT: SizeOfFunction: 0x18
; SYMS64-NEXT: SymbolIndexOfNextBeyond: [[#IND+4]]
; SYMS64-NEXT: Auxiliary Type: AUX_EXCEPT (0xFF)
; SYMS64-NEXT: }
; SYMS64-NEXT: Function Auxiliary Entry {
; SYMS64-NEXT: Index: [[#IND+2]]
; SYMS64-NEXT: SizeOfFunction: 0x18
; SYMS64-NEXT: PointerToLineNum: 0x0
; SYMS64-NEXT: SymbolIndexOfNextBeyond: [[#IND+4]]
; SYMS64-NEXT: Auxiliary Type: AUX_FCN (0xFE)
; SYMS64-NEXT: }
; SYMS64-NEXT: CSECT Auxiliary Entry {
; SYMS64-NEXT: Index: [[#IND+3]]
; SYMS64-NEXT: ContainingCsectSymbolIndex: 1
; SYMS64-NEXT: ParameterHashIndex: 0x0
; SYMS64-NEXT: TypeChkSectNum: 0x0
; SYMS64-NEXT: SymbolAlignmentLog2: 0
; SYMS64-NEXT: SymbolType: XTY_LD (0x2)
; SYMS64-NEXT: StorageMappingClass: XMC_PR (0x0)
; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
; SYMS64-NEXT: }
; SYMS64-NEXT: }
; SYMS64-NEXT: Symbol {
; SYMS64-NEXT: Index: [[#IND+4]]
; SYMS64-NEXT: Name: .test__trap_annotation_debug
; SYMS64-NEXT: Value (RelocatableAddress): 0x28
; SYMS64-NEXT: Section: .text
; SYMS64-NEXT: Type: 0x0
; SYMS64-NEXT: StorageClass: C_EXT (0x2)
; SYMS64-NEXT: NumberOfAuxEntries: 3
; SYMS64-NEXT: Exception Auxiliary Entry {
; SYMS64-NEXT: Index: [[#IND+5]]
; SYMS64-NEXT: OffsetToExceptionTable: 0x3AC
; SYMS64-NEXT: SizeOfFunction: 0x68
; SYMS64-NEXT: SymbolIndexOfNextBeyond: [[#IND+8]]
; SYMS64-NEXT: Auxiliary Type: AUX_EXCEPT (0xFF)
; SYMS64-NEXT: }
; SYMS64-NEXT: Function Auxiliary Entry {
; SYMS64-NEXT: Index: [[#IND+6]]
; SYMS64-NEXT: SizeOfFunction: 0x68
; SYMS64-NEXT: PointerToLineNum: 0x0
; SYMS64-NEXT: SymbolIndexOfNextBeyond: [[#IND+8]]
; SYMS64-NEXT: Auxiliary Type: AUX_FCN (0xFE)
; SYMS64-NEXT: }
; SYMS64-NEXT: CSECT Auxiliary Entry {
; SYMS64-NEXT: Index: [[#IND+7]]
; SYMS64-NEXT: ContainingCsectSymbolIndex: 1
; SYMS64-NEXT: ParameterHashIndex: 0x0
; SYMS64-NEXT: TypeChkSectNum: 0x0
; SYMS64-NEXT: SymbolAlignmentLog2: 0
; SYMS64-NEXT: SymbolType: XTY_LD (0x2)
; SYMS64-NEXT: StorageMappingClass: XMC_PR (0x0)
; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
; SYMS64-NEXT: }
; SYMS64-NEXT: }
|