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