1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
2 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s
4 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s
5 ; RUN: llvm-readobj --section-headers --file-header %t.o | \
6 ; RUN: FileCheck --check-prefix=OBJ %s
7 ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s
9 ; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \
10 ; RUN: FileCheck --check-prefix=OBJ64 %s
11 ; OBJ64: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
13 @a = internal global i32 0, align 4
14 @b = internal global i64 0, align 8
15 @c = internal global i16 0, align 2
17 ; CHECK: .lcomm a,4,a,2
18 ; CHECK-NEXT: .lcomm b,8,b,3
19 ; CHECK-NEXT: .lcomm c,2,c,1
21 ; OBJ: File: {{.*}}aix-xcoff-lcomm.ll.tmp.o
22 ; OBJ-NEXT: Format: aixcoff-rs6000
23 ; OBJ-NEXT: Arch: powerpc
24 ; OBJ-NEXT: AddressSize: 32bit
25 ; OBJ-NEXT: FileHeader {
26 ; OBJ-NEXT: Magic: 0x1DF
27 ; OBJ-NEXT: NumberOfSections: 1
28 ; OBJ-NEXT: TimeStamp:
29 ; OBJ-NEXT: SymbolTableOffset: 0x3C
30 ; OBJ-NEXT: SymbolTableEntries: 6
31 ; OBJ-NEXT: OptionalHeaderSize: 0x0
32 ; OBJ-NEXT: Flags: 0x0
34 ; OBJ-NEXT: Sections [
37 ; OBJ-NEXT: Name: .bss
38 ; OBJ-NEXT: PhysicalAddress: 0x0
39 ; OBJ-NEXT: VirtualAddress: 0x0
40 ; OBJ-NEXT: Size: 0x14
41 ; OBJ-NEXT: RawDataOffset: 0x0
42 ; OBJ-NEXT: RelocationPointer: 0x0
43 ; OBJ-NEXT: LineNumberPointer: 0x0
44 ; OBJ-NEXT: NumberOfRelocations: 0
45 ; OBJ-NEXT: NumberOfLineNumbers: 0
46 ; OBJ-NEXT: Type: STYP_BSS (0x80)
50 ; SYMS: File: {{.*}}aix-xcoff-lcomm.ll.tmp.o
51 ; SYMS-NEXT: Format: aixcoff-rs6000
52 ; SYMS-NEXT: Arch: powerpc
53 ; SYMS-NEXT: AddressSize: 32bit
54 ; SYMS-NEXT: Symbols [
56 ; SYMS-NEXT: Index: [[#Index:]]
58 ; SYMS-NEXT: Value (RelocatableAddress): 0x0
59 ; SYMS-NEXT: Section: .bss
60 ; SYMS-NEXT: Type: 0x0
61 ; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B)
62 ; SYMS-NEXT: NumberOfAuxEntries: 1
63 ; SYMS-NEXT: CSECT Auxiliary Entry {
64 ; SYMS-NEXT: Index: [[#Index + 1]]
65 ; SYMS-NEXT: SectionLen: 4
66 ; SYMS-NEXT: ParameterHashIndex: 0x0
67 ; SYMS-NEXT: TypeChkSectNum: 0x0
68 ; SYMS-NEXT: SymbolAlignmentLog2: 2
69 ; SYMS-NEXT: SymbolType: XTY_CM (0x3)
70 ; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9)
71 ; SYMS-NEXT: StabInfoIndex: 0x0
72 ; SYMS-NEXT: StabSectNum: 0x0
76 ; SYMS-NEXT: Index: [[#Index + 2]]
78 ; SYMS-NEXT: Value (RelocatableAddress): 0x8
79 ; SYMS-NEXT: Section: .bss
80 ; SYMS-NEXT: Type: 0x0
81 ; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B)
82 ; SYMS-NEXT: NumberOfAuxEntries: 1
83 ; SYMS-NEXT: CSECT Auxiliary Entry {
84 ; SYMS-NEXT: Index: [[#Index + 3]]
85 ; SYMS-NEXT: SectionLen: 8
86 ; SYMS-NEXT: ParameterHashIndex: 0x0
87 ; SYMS-NEXT: TypeChkSectNum: 0x0
88 ; SYMS-NEXT: SymbolAlignmentLog2: 3
89 ; SYMS-NEXT: SymbolType: XTY_CM (0x3)
90 ; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9)
91 ; SYMS-NEXT: StabInfoIndex: 0x0
92 ; SYMS-NEXT: StabSectNum: 0x0
96 ; SYMS-NEXT: Index: [[#Index + 4]]
98 ; SYMS-NEXT: Value (RelocatableAddress): 0x10
99 ; SYMS-NEXT: Section: .bss
100 ; SYMS-NEXT: Type: 0x0
101 ; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B)
102 ; SYMS-NEXT: NumberOfAuxEntries: 1
103 ; SYMS-NEXT: CSECT Auxiliary Entry {
104 ; SYMS-NEXT: Index: [[#Index + 5]]
105 ; SYMS-NEXT: SectionLen: 2
106 ; SYMS-NEXT: ParameterHashIndex: 0x0
107 ; SYMS-NEXT: TypeChkSectNum: 0x0
108 ; SYMS-NEXT: SymbolAlignmentLog2: 1
109 ; SYMS-NEXT: SymbolType: XTY_CM (0x3)
110 ; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9)
111 ; SYMS-NEXT: StabInfoIndex: 0x0
112 ; SYMS-NEXT: StabSectNum: 0x0