aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll
blob: 668d0a496170cdcc88e5faf249c1209aae4f66b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -data-sections=false < %s | \
; RUN:   FileCheck --check-prefixes=CHECK,ASM32 %s
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %s | \
; RUN:   FileCheck --check-prefixes=CHECK,ASM64 %s

; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -data-sections=false \
; RUN:   -filetype=obj -o %t.o < %s
; RUN: llvm-readobj -r --expand-relocs --syms %t.o | FileCheck --check-prefixes=RELOC,SYM,RELOC32,SYM32 %s

; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \
; RUN:   -filetype=obj -o %t64.o < %s
; RUN: llvm-readobj -r --expand-relocs --syms %t64.o | FileCheck --check-prefixes=RELOC,SYM,RELOC64,SYM64 %s

@common = common global i32 0, align 4
@pointer = global ptr @common, align 4


; CHECK:             .comm   common[RW],4,2
; ASM32-NEXT:        .csect .data[RW],2
; ASM64-NEXT:        .csect .data[RW],3
; CHECK-NEXT:        .globl  pointer
; ASM32-NEXT:        .align  2
; ASM64-NEXT:        .align  3
; CHECK-NEXT:pointer:
; ASM32-NEXT:        .vbyte	4, common[RW]
; ASM64-NEXT:        .vbyte	8, common[RW]


; RELOC:      Relocations [
; RELOC-NEXT:   Section (index: {{[0-9]+}}) .data {
; RELOC-NEXT:   Relocation {
; RELOC-NEXT:     Virtual Address: 0x0
; RELOC-NEXT:     Symbol: common ([[#COM_INDX:]])
; RELOC-NEXT:     IsSigned: No
; RELOC-NEXT:     FixupBitValue: 0
; RELOC32-NEXT:   Length: 32
; RELOC64-NEXT:   Length: 64
; RELOC-NEXT:     Type: R_POS (0x0)
; RELOC-NEXT:   }
; RELOC-NEXT: }
; RELOC-NEXT: ]

; SYM:        Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .data
; SYM-NEXT:     Value (RelocatableAddress): 0x0
; SYM-NEXT:     Section: .data
; SYM-NEXT:     Type: 0x0
; SYM-NEXT:     StorageClass: C_HIDEXT (0x6B)
; SYM-NEXT:     NumberOfAuxEntries: 1
; SYM-NEXT:     CSECT Auxiliary Entry {
; SYM-NEXT:       Index: [[#INDX+1]]
; SYM32-NEXT:     SectionLen: 4
; SYM64-NEXT:     SectionLen: 8
; SYM-NEXT:       ParameterHashIndex: 0x0
; SYM-NEXT:       TypeChkSectNum: 0x0
; SYM32-NEXT:     SymbolAlignmentLog2: 2
; SYM64-NEXT:     SymbolAlignmentLog2: 3
; SYM-NEXT:       SymbolType: XTY_SD (0x1)
; SYM-NEXT:       StorageMappingClass: XMC_RW (0x5)
; SYM32-NEXT:     StabInfoIndex: 0x0
; SYM32-NEXT:     StabSectNum: 0x0
; SYM64-NEXT:     Auxiliary Type: AUX_CSECT (0xFB)
; SYM-NEXT:     }
; SYM-NEXT:   }
; SYM-NEXT:   Symbol {
; SYM-NEXT:     Index: [[#INDX+2]]
; SYM-NEXT:     Name: pointer
; SYM-NEXT:     Value (RelocatableAddress): 0x0
; SYM-NEXT:     Section: .data
; SYM-NEXT:     Type: 0x0
; SYM-NEXT:     StorageClass: C_EXT (0x2)
; SYM-NEXT:     NumberOfAuxEntries: 1
; SYM-NEXT:     CSECT Auxiliary Entry {
; SYM-NEXT:       Index: [[#INDX+3]]
; SYM-NEXT:       ContainingCsectSymbolIndex: [[#INDX]]
; SYM-NEXT:       ParameterHashIndex: 0x0
; SYM-NEXT:       TypeChkSectNum: 0x0
; SYM-NEXT:       SymbolAlignmentLog2: 0
; SYM-NEXT:       SymbolType: XTY_LD (0x2)
; SYM-NEXT:       StorageMappingClass: XMC_RW (0x5)
; SYM32-NEXT:     StabInfoIndex: 0x0
; SYM32-NEXT:     StabSectNum: 0x0
; SYM64-NEXT:     Auxiliary Type: AUX_CSECT (0xFB)
; SYM-NEXT:     }
; SYM-NEXT:   }
; SYM-NEXT:   Symbol {
; SYM-NEXT:     Index: [[#COM_INDX]]
; SYM-NEXT:     Name: common
; SYM32-NEXT:   Value (RelocatableAddress): 0x4
; SYM64-NEXT:   Value (RelocatableAddress): 0x8
; SYM-NEXT:     Section: .bss
; SYM-NEXT:     Type: 0x0
; SYM-NEXT:     StorageClass: C_EXT (0x2)
; SYM-NEXT:     NumberOfAuxEntries: 1
; SYM-NEXT:     CSECT Auxiliary Entry {
; SYM-NEXT:       Index: [[#COM_INDX+1]]
; SYM-NEXT:       SectionLen: 4
; SYM-NEXT:       ParameterHashIndex: 0x0
; SYM-NEXT:       TypeChkSectNum: 0x0
; SYM-NEXT:       SymbolAlignmentLog2: 2
; SYM-NEXT:       SymbolType: XTY_CM (0x3)
; SYM-NEXT:       StorageMappingClass: XMC_RW (0x5)
; SYM32-NEXT:     StabInfoIndex: 0x0
; SYM32-NEXT:     StabSectNum: 0x0
; SYM64-NEXT:     Auxiliary Type: AUX_CSECT (0xFB)
; SYM-NEXT:     }
; SYM-NEXT:   }