1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
3 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s
4 ; RUN: llvm-readobj --section-headers --file-header %t.o | \
5 ; RUN: FileCheck --check-prefix=OBJ %s
7 ; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj -o %t.o 2>&1 \
8 ; RUN: < %s | FileCheck --check-prefix=XCOFF64 %s
10 ; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
12 @a = common global i32 0, align 4
13 @b = common global i64 0, align 8
14 @c = common global i16 0, align 2
16 @d = common local_unnamed_addr global double 0.000000e+00, align 8
17 @f = common local_unnamed_addr global float 0.000000e+00, align 4
19 @over_aligned = common local_unnamed_addr global double 0.000000e+00, align 32
21 @array = common local_unnamed_addr global [33 x i8] zeroinitializer, align 1
23 ; CHECK: .csect .text[PR]
25 ; CHECK-NEXT: .comm a,4,2
26 ; CHECK-NEXT: .comm b,8,3
27 ; CHECK-NEXT: .comm c,2,1
28 ; CHECK-NEXT: .comm d,8,3
29 ; CHECK-NEXT: .comm f,4,2
30 ; CHECK-NEXT: .comm over_aligned,8,5
31 ; CHECK-NEXT: .comm array,33,0
33 ; OBJ: File: {{.*}}aix-xcoff-common.ll.tmp.o
34 ; OBJ-NEXT: Format: aixcoff-rs6000
35 ; OBJ-NEXT: Arch: powerpc
36 ; OBJ-NEXT: AddressSize: 32bit
37 ; OBJ-NEXT: FileHeader {
38 ; OBJ-NEXT: Magic: 0x1DF
39 ; OBJ-NEXT: NumberOfSections: 1
40 ; OBJ-NEXT: TimeStamp:
41 ; OBJ-NEXT: SymbolTableOffset: 0x3C
42 ; OBJ-NEXT: SymbolTableEntries: 14
43 ; OBJ-NEXT: OptionalHeaderSize: 0x0
44 ; OBJ-NEXT: Flags: 0x0
46 ; OBJ-NEXT: Sections [
49 ; OBJ-NEXT: Name: .bss
50 ; OBJ-NEXT: PhysicalAddress: 0x0
51 ; OBJ-NEXT: VirtualAddress: 0x0
52 ; OBJ-NEXT: Size: 0x6C
53 ; OBJ-NEXT: RawDataOffset: 0x0
54 ; OBJ-NEXT: RelocationPointer: 0x0
55 ; OBJ-NEXT: LineNumberPointer: 0x0
56 ; OBJ-NEXT: NumberOfRelocations: 0
57 ; OBJ-NEXT: NumberOfLineNumbers: 0
58 ; OBJ-NEXT: Type: STYP_BSS (0x80)