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 \
7 ; RUN: -filetype=obj -o %t.o < %s
8 ; RUN: llvm-readobj -r --expand-relocs --syms %t.o | FileCheck --check-prefixes=RELOC,SYM,RELOC32,SYM32 %s
10 ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \
11 ; RUN: -filetype=obj -o %t64.o < %s
12 ; RUN: llvm-readobj -r --expand-relocs --syms %t64.o | FileCheck --check-prefixes=RELOC,SYM,RELOC64,SYM64 %s
14 @common = common global i32 0, align 4
15 @pointer = global ptr @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 ; RELOC32-NEXT: Length: 32
37 ; RELOC64-NEXT: Length: 64
38 ; RELOC-NEXT: Type: R_POS (0x0)
43 ; SYM: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .data
44 ; SYM-NEXT: Value (RelocatableAddress): 0x0
45 ; SYM-NEXT: Section: .data
47 ; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
48 ; SYM-NEXT: NumberOfAuxEntries: 1
49 ; SYM-NEXT: CSECT Auxiliary Entry {
50 ; SYM-NEXT: Index: [[#INDX+1]]
51 ; SYM32-NEXT: SectionLen: 4
52 ; SYM64-NEXT: SectionLen: 8
53 ; SYM-NEXT: ParameterHashIndex: 0x0
54 ; SYM-NEXT: TypeChkSectNum: 0x0
55 ; SYM32-NEXT: SymbolAlignmentLog2: 2
56 ; SYM64-NEXT: SymbolAlignmentLog2: 3
57 ; SYM-NEXT: SymbolType: XTY_SD (0x1)
58 ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5)
59 ; SYM32-NEXT: StabInfoIndex: 0x0
60 ; SYM32-NEXT: StabSectNum: 0x0
61 ; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
65 ; SYM-NEXT: Index: [[#INDX+2]]
66 ; SYM-NEXT: Name: pointer
67 ; SYM-NEXT: Value (RelocatableAddress): 0x0
68 ; SYM-NEXT: Section: .data
70 ; SYM-NEXT: StorageClass: C_EXT (0x2)
71 ; SYM-NEXT: NumberOfAuxEntries: 1
72 ; SYM-NEXT: CSECT Auxiliary Entry {
73 ; SYM-NEXT: Index: [[#INDX+3]]
74 ; SYM-NEXT: ContainingCsectSymbolIndex: [[#INDX]]
75 ; SYM-NEXT: ParameterHashIndex: 0x0
76 ; SYM-NEXT: TypeChkSectNum: 0x0
77 ; SYM-NEXT: SymbolAlignmentLog2: 0
78 ; SYM-NEXT: SymbolType: XTY_LD (0x2)
79 ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5)
80 ; SYM32-NEXT: StabInfoIndex: 0x0
81 ; SYM32-NEXT: StabSectNum: 0x0
82 ; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
86 ; SYM-NEXT: Index: [[#COM_INDX]]
87 ; SYM-NEXT: Name: common
88 ; SYM32-NEXT: Value (RelocatableAddress): 0x4
89 ; SYM64-NEXT: Value (RelocatableAddress): 0x8
90 ; SYM-NEXT: Section: .bss
92 ; SYM-NEXT: StorageClass: C_EXT (0x2)
93 ; SYM-NEXT: NumberOfAuxEntries: 1
94 ; SYM-NEXT: CSECT Auxiliary Entry {
95 ; SYM-NEXT: Index: [[#COM_INDX+1]]
96 ; SYM-NEXT: SectionLen: 4
97 ; SYM-NEXT: ParameterHashIndex: 0x0
98 ; SYM-NEXT: TypeChkSectNum: 0x0
99 ; SYM-NEXT: SymbolAlignmentLog2: 2
100 ; SYM-NEXT: SymbolType: XTY_CM (0x3)
101 ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5)
102 ; SYM32-NEXT: StabInfoIndex: 0x0
103 ; SYM32-NEXT: StabSectNum: 0x0
104 ; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)