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: 2
28 ; OBJ-NEXT: TimeStamp:
29 ; OBJ-NEXT: SymbolTableOffset: 0x64
30 ; OBJ-NEXT: SymbolTableEntries: 8
31 ; OBJ-NEXT: OptionalHeaderSize: 0x0
32 ; OBJ-NEXT: Flags: 0x0
34 ; OBJ-NEXT: Sections [
35 ; OBJ: Section {{[{][[:space:]] *}}Index: 2
36 ; OBJ-NEXT: Name: .bss
37 ; OBJ-NEXT: PhysicalAddress: 0x0
38 ; OBJ-NEXT: VirtualAddress: 0x0
39 ; OBJ-NEXT: Size: 0x14
40 ; OBJ-NEXT: RawDataOffset: 0x0
41 ; OBJ-NEXT: RelocationPointer: 0x0
42 ; OBJ-NEXT: LineNumberPointer: 0x0
43 ; OBJ-NEXT: NumberOfRelocations: 0
44 ; OBJ-NEXT: NumberOfLineNumbers: 0
45 ; OBJ-NEXT: Type: STYP_BSS (0x80)
49 ; SYMS: File: {{.*}}aix-xcoff-lcomm.ll.tmp.o
50 ; SYMS-NEXT: Format: aixcoff-rs6000
51 ; SYMS-NEXT: Arch: powerpc
52 ; SYMS-NEXT: AddressSize: 32bit
53 ; SYMS-NEXT: Symbols [
54 ; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#Index:]]{{[[:space:]] *}}Name: a
55 ; SYMS-NEXT: Value (RelocatableAddress): 0x0
56 ; SYMS-NEXT: Section: .bss
57 ; SYMS-NEXT: Type: 0x0
58 ; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B)
59 ; SYMS-NEXT: NumberOfAuxEntries: 1
60 ; SYMS-NEXT: CSECT Auxiliary Entry {
61 ; SYMS-NEXT: Index: [[#Index + 1]]
62 ; SYMS-NEXT: SectionLen: 4
63 ; SYMS-NEXT: ParameterHashIndex: 0x0
64 ; SYMS-NEXT: TypeChkSectNum: 0x0
65 ; SYMS-NEXT: SymbolAlignmentLog2: 2
66 ; SYMS-NEXT: SymbolType: XTY_CM (0x3)
67 ; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9)
68 ; SYMS-NEXT: StabInfoIndex: 0x0
69 ; SYMS-NEXT: StabSectNum: 0x0
73 ; SYMS-NEXT: Index: [[#Index + 2]]
75 ; SYMS-NEXT: Value (RelocatableAddress): 0x8
76 ; SYMS-NEXT: Section: .bss
77 ; SYMS-NEXT: Type: 0x0
78 ; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B)
79 ; SYMS-NEXT: NumberOfAuxEntries: 1
80 ; SYMS-NEXT: CSECT Auxiliary Entry {
81 ; SYMS-NEXT: Index: [[#Index + 3]]
82 ; SYMS-NEXT: SectionLen: 8
83 ; SYMS-NEXT: ParameterHashIndex: 0x0
84 ; SYMS-NEXT: TypeChkSectNum: 0x0
85 ; SYMS-NEXT: SymbolAlignmentLog2: 3
86 ; SYMS-NEXT: SymbolType: XTY_CM (0x3)
87 ; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9)
88 ; SYMS-NEXT: StabInfoIndex: 0x0
89 ; SYMS-NEXT: StabSectNum: 0x0
93 ; SYMS-NEXT: Index: [[#Index + 4]]
95 ; SYMS-NEXT: Value (RelocatableAddress): 0x10
96 ; SYMS-NEXT: Section: .bss
97 ; SYMS-NEXT: Type: 0x0
98 ; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B)
99 ; SYMS-NEXT: NumberOfAuxEntries: 1
100 ; SYMS-NEXT: CSECT Auxiliary Entry {
101 ; SYMS-NEXT: Index: [[#Index + 5]]
102 ; SYMS-NEXT: SectionLen: 2
103 ; SYMS-NEXT: ParameterHashIndex: 0x0
104 ; SYMS-NEXT: TypeChkSectNum: 0x0
105 ; SYMS-NEXT: SymbolAlignmentLog2: 1
106 ; SYMS-NEXT: SymbolType: XTY_CM (0x3)
107 ; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9)
108 ; SYMS-NEXT: StabInfoIndex: 0x0
109 ; SYMS-NEXT: StabSectNum: 0x0