1 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -data-sections=false < %s | \
2 ; RUN: FileCheck --check-prefixes=CHECK,ASM32 %s
3 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %s | \
4 ; RUN: FileCheck --check-prefixes=CHECK,ASM64 %s
6 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s
7 ; RUN: llvm-readobj -r --expand-relocs --syms %t.o | FileCheck --check-prefixes=RELOC,SYM %s
9 ; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \
10 ; RUN: -data-sections=false -filetype=obj < %s 2>&1 | \
11 ; RUN: FileCheck --check-prefix=XCOFF64 %s
12 ; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
14 @common = common global i32 0, align 4
15 @pointer = global i32* @common, align 4
18 ; CHECK: .comm common[RW],4,2
19 ; ASM32-NEXT: .csect .data[RW],2
20 ; ASM64-NEXT: .csect .data[RW],3
21 ; CHECK-NEXT: .globl pointer
22 ; ASM32-NEXT: .align 2
23 ; ASM64-NEXT: .align 3
25 ; ASM32-NEXT: .vbyte 4, common[RW]
26 ; ASM64-NEXT: .vbyte 8, common[RW]
29 ; RELOC: Relocations [
30 ; RELOC-NEXT: Section (index: {{[0-9]+}}) .data {
31 ; RELOC-NEXT: Relocation {
32 ; RELOC-NEXT: Virtual Address: 0x0
33 ; RELOC-NEXT: Symbol: common ([[#COM_INDX:]])
34 ; RELOC-NEXT: IsSigned: No
35 ; RELOC-NEXT: FixupBitValue: 0
36 ; RELOC-NEXT: Length: 32
37 ; RELOC-NEXT: Type: R_POS (0x0)
42 ; SYM: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .data
43 ; SYM-NEXT: Value (RelocatableAddress): 0x0
44 ; SYM-NEXT: Section: .data
46 ; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
47 ; SYM-NEXT: NumberOfAuxEntries: 1
48 ; SYM-NEXT: CSECT Auxiliary Entry {
49 ; SYM-NEXT: Index: [[#INDX+1]]
50 ; SYM-NEXT: SectionLen: 4
51 ; SYM-NEXT: ParameterHashIndex: 0x0
52 ; SYM-NEXT: TypeChkSectNum: 0x0
53 ; SYM-NEXT: SymbolAlignmentLog2: 2
54 ; SYM-NEXT: SymbolType: XTY_SD (0x1)
55 ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5)
56 ; SYM-NEXT: StabInfoIndex: 0x0
57 ; SYM-NEXT: StabSectNum: 0x0
61 ; SYM-NEXT: Index: [[#INDX+2]]
62 ; SYM-NEXT: Name: pointer
63 ; SYM-NEXT: Value (RelocatableAddress): 0x0
64 ; SYM-NEXT: Section: .data
66 ; SYM-NEXT: StorageClass: C_EXT (0x2)
67 ; SYM-NEXT: NumberOfAuxEntries: 1
68 ; SYM-NEXT: CSECT Auxiliary Entry {
69 ; SYM-NEXT: Index: [[#INDX+3]]
70 ; SYM-NEXT: ContainingCsectSymbolIndex: [[#INDX]]
71 ; SYM-NEXT: ParameterHashIndex: 0x0
72 ; SYM-NEXT: TypeChkSectNum: 0x0
73 ; SYM-NEXT: SymbolAlignmentLog2: 0
74 ; SYM-NEXT: SymbolType: XTY_LD (0x2)
75 ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5)
76 ; SYM-NEXT: StabInfoIndex: 0x0
77 ; SYM-NEXT: StabSectNum: 0x0
81 ; SYM-NEXT: Index: [[#COM_INDX]]
82 ; SYM-NEXT: Name: common
83 ; SYM-NEXT: Value (RelocatableAddress): 0x4
84 ; SYM-NEXT: Section: .bss
86 ; SYM-NEXT: StorageClass: C_EXT (0x2)
87 ; SYM-NEXT: NumberOfAuxEntries: 1
88 ; SYM-NEXT: CSECT Auxiliary Entry {
89 ; SYM-NEXT: Index: [[#COM_INDX+1]]
90 ; SYM-NEXT: SectionLen: 4
91 ; SYM-NEXT: ParameterHashIndex: 0x0
92 ; SYM-NEXT: TypeChkSectNum: 0x0
93 ; SYM-NEXT: SymbolAlignmentLog2: 2
94 ; SYM-NEXT: SymbolType: XTY_CM (0x3)
95 ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5)
96 ; SYM-NEXT: StabInfoIndex: 0x0
97 ; SYM-NEXT: StabSectNum: 0x0