diff --git a/llvm/include/llvm/MC/MCSectionXCOFF.h b/llvm/include/llvm/MC/MCSectionXCOFF.h --- a/llvm/include/llvm/MC/MCSectionXCOFF.h +++ b/llvm/include/llvm/MC/MCSectionXCOFF.h @@ -38,6 +38,7 @@ Optional DwarfSubtypeFlags; bool MultiSymbolsAllowed; static constexpr unsigned DefaultAlignVal = 4; + static constexpr unsigned DefaultTextAlignVal = 32; MCSectionXCOFF(StringRef Name, XCOFF::StorageMappingClass SMC, XCOFF::SymbolType ST, SectionKind K, MCSymbolXCOFF *QualName, @@ -57,9 +58,14 @@ QualName->setRepresentedCsect(this); QualName->setStorageClass(XCOFF::C_HIDEXT); - // A csect is 4 byte aligned by default, except for undefined symbol csects. - if (ST != XCOFF::XTY_ER) - setAlignment(Align(DefaultAlignVal)); + if (ST != XCOFF::XTY_ER) { + // For a csect for program code, set the alignment to 32 bytes by default. + // For other csects, set the alignment to 4 bytes by default. + if (SMC == XCOFF::XMC_PR) + setAlignment(Align(DefaultTextAlignVal)); + else + setAlignment(Align(DefaultAlignVal)); + } } MCSectionXCOFF(StringRef Name, SectionKind K, MCSymbolXCOFF *QualName, @@ -74,9 +80,8 @@ // FIXME: use a more meaningful name for non csect sections. QualName->setRepresentedCsect(this); - // Set default alignment 4 for all non csect sections for now. - // FIXME: set different alignments according to section types. - setAlignment(Align(DefaultAlignVal)); + // Use default text alignment as the alignment for DWARF sections. + setAlignment(Align(DefaultTextAlignVal)); } void printCsectDirective(raw_ostream &OS) const; diff --git a/llvm/test/CodeGen/PowerPC/aix-alias.ll b/llvm/test/CodeGen/PowerPC/aix-alias.ll --- a/llvm/test/CodeGen/PowerPC/aix-alias.ll +++ b/llvm/test/CodeGen/PowerPC/aix-alias.ll @@ -56,7 +56,7 @@ ; ASM-NEXT: .csect fun[DS] ; ASM-NEXT: fun_weak: # @fun ; ASM-NEXT: fun_hidden: -; ASM: .csect .text[PR],2 +; ASM: .csect .text[PR],5 ; ASM-NEXT: .fun: ; ASM-NEXT: .fun_weak: ; ASM-NEXT: .fun_hidden: @@ -64,7 +64,7 @@ ; ASM-NEXT: li 3, 0 ; ASM-NEXT: blr ; ASM-NEXT: # -- End function -; ASM: .csect .text[PR],2 +; ASM: .csect .text[PR],5 ; ASM-NEXT: .test: ; ASM-NEXT: # %bb.0: # %entry ; ASM: bl .fun diff --git a/llvm/test/CodeGen/PowerPC/aix-dwarf.ll b/llvm/test/CodeGen/PowerPC/aix-dwarf.ll --- a/llvm/test/CodeGen/PowerPC/aix-dwarf.ll +++ b/llvm/test/CodeGen/PowerPC/aix-dwarf.ll @@ -62,10 +62,10 @@ ; SEC-NEXT: VirtualAddress: 0x28 ; SEC32-NEXT: Size: 0xC ; SEC32-NEXT: RawDataOffset: 0x104 -; SEC32-NEXT: RelocationPointer: 0x1D8 +; SEC32-NEXT: RelocationPointer: 0x1F4 ; SEC64-NEXT: Size: 0x18 ; SEC64-NEXT: RawDataOffset: 0x1A8 -; SEC64-NEXT: RelocationPointer: 0x2B0 +; SEC64-NEXT: RelocationPointer: 0x2C8 ; SEC-NEXT: LineNumberPointer: 0x0 ; SEC-NEXT: NumberOfRelocations: 2 ; SEC-NEXT: NumberOfLineNumbers: 0 @@ -77,7 +77,7 @@ ; SEC-NEXT: PhysicalAddress: 0x0 ; SEC-NEXT: VirtualAddress: 0x0 ; SEC-NEXT: Size: 0x36 -; SEC32-NEXT: RawDataOffset: 0x110 +; SEC32-NEXT: RawDataOffset: 0x11C ; SEC64-NEXT: RawDataOffset: 0x1C0 ; SEC-NEXT: RelocationPointer: 0x0 ; SEC-NEXT: LineNumberPointer: 0x0 @@ -91,11 +91,11 @@ ; SEC-NEXT: PhysicalAddress: 0x0 ; SEC-NEXT: VirtualAddress: 0x0 ; SEC32-NEXT: Size: 0x57 -; SEC32-NEXT: RawDataOffset: 0x148 -; SEC32-NEXT: RelocationPointer: 0x1EC +; SEC32-NEXT: RawDataOffset: 0x15C +; SEC32-NEXT: RelocationPointer: 0x208 ; SEC64-NEXT: Size: 0x6F -; SEC64-NEXT: RawDataOffset: 0x1F8 -; SEC64-NEXT: RelocationPointer: 0x2CC +; SEC64-NEXT: RawDataOffset: 0x200 +; SEC64-NEXT: RelocationPointer: 0x2E4 ; SEC-NEXT: LineNumberPointer: 0x0 ; SEC-NEXT: NumberOfRelocations: 4 ; SEC-NEXT: NumberOfLineNumbers: 0 @@ -107,11 +107,11 @@ ; SEC-NEXT: PhysicalAddress: 0x0 ; SEC-NEXT: VirtualAddress: 0x0 ; SEC32-NEXT: Size: 0x36 -; SEC32-NEXT: RawDataOffset: 0x1A0 -; SEC32-NEXT: RelocationPointer: 0x214 +; SEC32-NEXT: RawDataOffset: 0x1BC +; SEC32-NEXT: RelocationPointer: 0x230 ; SEC64-NEXT: Size: 0x46 -; SEC64-NEXT: RawDataOffset: 0x268 -; SEC64-NEXT: RelocationPointer: 0x304 +; SEC64-NEXT: RawDataOffset: 0x280 +; SEC64-NEXT: RelocationPointer: 0x31C ; SEC-NEXT: LineNumberPointer: 0x0 ; SEC-NEXT: NumberOfRelocations: 1 ; SEC-NEXT: NumberOfLineNumbers: 0 diff --git a/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll b/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll --- a/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll +++ b/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll @@ -89,8 +89,8 @@ ; COMMON-NEXT: .align 2 ; COMMON-NEXT: .vbyte 4, 0 ; COMMON-NEXT: .vbyte 4, 0 -; CHECK-ASM-NEXT: .csect .text[PR],2 -; CHECK-FUNC-NEXT: .csect .foov[PR],2 +; CHECK-ASM-NEXT: .csect .text[PR],5 +; CHECK-FUNC-NEXT: .csect .foov[PR],5 ; COMMON-NEXT: # -- End function ; COMMON: .toc ; COMMON: L..C2: diff --git a/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable.ll b/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable.ll --- a/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable.ll +++ b/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable.ll @@ -141,7 +141,7 @@ } ; CHECK-ASM-LABEL: ._Z10add_structifd1SP2SD1Di:{{[[:space:]] *}}# %bb.0: -; CHECK-FUNC-LABEL: csect ._Z10add_structifd1SP2SD1Di[PR],2{{[[:space:]] *}}# %bb.0: +; CHECK-FUNC-LABEL: csect ._Z10add_structifd1SP2SD1Di[PR],5{{[[:space:]] *}}# %bb.0: ; COMMON-NEXT: lwz 4, L..C0(2) ; COMMON-NEXT: stfs 1, -24(1) ; COMMON-NEXT: lfs 0, 0(4) @@ -174,7 +174,7 @@ ; CHECK-ASM-LABEL: .main:{{[[:space:]] *}}# %bb.0: -; CHECK-FUNC-LABEL: .csect .main[PR],2{{[[:space:]] *}}# %bb.0 +; CHECK-FUNC-LABEL: .csect .main[PR],5{{[[:space:]] *}}# %bb.0 ; COMMON-NEXT: mflr 0 ; COMMON-NEXT: stw 0, 8(1) ; COMMON: mtlr 0 @@ -202,7 +202,7 @@ ; CHECK-ASM-LABEL: ._Z7add_bari1SfdP2SD1Di:{{[[:space:]] *}}# %bb.0: -; CHECK-FUNC-LABEL: .csect ._Z7add_bari1SfdP2SD1Di[PR],2{{[[:space:]] *}}# %bb.0: +; CHECK-FUNC-LABEL: .csect ._Z7add_bari1SfdP2SD1Di[PR],5{{[[:space:]] *}}# %bb.0: ; COMMON: .vbyte 4, 0x00000000 # Traceback table begin ; COMMON-NEXT: .byte 0x00 # Version = 0 ; COMMON-NEXT: .byte 0x09 # Language = CPlusPlus @@ -226,7 +226,7 @@ ; CHECK-ASM-LABEL: .foo:{{[[:space:]] *}}# %bb.0: -; CHECK-FUNC-LABEL: .csect .foo[PR],2{{[[:space:]] *}}# %bb.0: +; CHECK-FUNC-LABEL: .csect .foo[PR],5{{[[:space:]] *}}# %bb.0: ; COMMON: stw 3, -4(1) ; COMMON-NEXT: blr ; COMMON-NEXT:L..foo0: diff --git a/llvm/test/CodeGen/PowerPC/aix-exception.ll b/llvm/test/CodeGen/PowerPC/aix-exception.ll --- a/llvm/test/CodeGen/PowerPC/aix-exception.ll +++ b/llvm/test/CodeGen/PowerPC/aix-exception.ll @@ -28,7 +28,7 @@ } ; ASMNFS: ._Z9throwFuncv: -; ASMFS: .csect ._Z9throwFuncv[PR],2 +; ASMFS: .csect ._Z9throwFuncv[PR],5 ; ASM: bl .__cxa_allocate_exception[PR] ; ASM: nop ; ASM32: lwz 4, L..C0(2) @@ -90,7 +90,7 @@ } ; ASMNFS: ._Z9catchFuncv: -; ASMFS: .csect ._Z9catchFuncv[PR],2 +; ASMFS: .csect ._Z9catchFuncv[PR],5 ; ASM: L..func_begin0: ; ASM: # %bb.0: # %entry ; ASM: mflr 0 diff --git a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll @@ -192,7 +192,7 @@ ; CHECKSYM-NEXT: SectionLen: 80 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 5 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) ; CHECKSYM32-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-extern.ll b/llvm/test/CodeGen/PowerPC/aix-extern.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern.ll @@ -215,7 +215,7 @@ ; CHECKSYM-NEXT: SectionLen: 112 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 5 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) ; CHECKSYM32-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll b/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll --- a/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll +++ b/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll @@ -34,7 +34,7 @@ ; CHECK-NEXT: SectionLen: 4 ; CHECK-NEXT: ParameterHashIndex: 0x0 ; CHECK-NEXT: TypeChkSectNum: 0x0 -; CHECK-NEXT: SymbolAlignmentLog2: 4 +; CHECK-NEXT: SymbolAlignmentLog2: 5 ; CHECK-NEXT: SymbolType: XTY_SD (0x1) ; CHECK-NEXT: StorageMappingClass: XMC_PR (0x0) ; CHECK-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll b/llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll --- a/llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll +++ b/llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll @@ -190,7 +190,7 @@ ; 64LARGE-ASM: .vbyte 4, L..BB0_4-L..JTI0_0 ; 64LARGE-ASM: .vbyte 4, L..BB0_5-L..JTI0_0 -; FUNC-ASM: .csect .jump_table[PR],2 +; FUNC-ASM: .csect .jump_table[PR],5 ; FUNC-ASM: L..BB0_2: ; FUNC-ASM: L..BB0_3: ; FUNC-ASM: L..BB0_4: diff --git a/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll b/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll --- a/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll +++ b/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll @@ -56,7 +56,7 @@ ; SYM64: .vbyte 8, .__gxx_personality_v0 ; SYM64: .vbyte 8, TOC[TC0] ; SYM64: .vbyte 8, 0 -; SYM: .csect .text[PR],2 +; SYM: .csect .text[PR],5 ; SYM: .__gxx_personality_v0: ; SYM: .__xlcxx_personality_v1: ; SYM: # %bb.0: # %entry diff --git a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll --- a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll +++ b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll @@ -251,7 +251,7 @@ ; SYM-NEXT: SectionLen: 132 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 4 +; SYM-NEXT: SymbolAlignmentLog2: 5 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) ; SYM-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll --- a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll @@ -212,7 +212,7 @@ ; SYM-NEXT: SectionLen: 104 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 4 +; SYM-NEXT: SymbolAlignmentLog2: 5 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) ; SYM-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll --- a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll +++ b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll @@ -128,7 +128,7 @@ ; SYMS-NEXT: SectionLen: 0 ; SYMS-NEXT: ParameterHashIndex: 0x0 ; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 2 +; SYMS-NEXT: SymbolAlignmentLog2: 5 ; SYMS-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NEXT: StorageMappingClass: XMC_PR (0x0) ; SYMS-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-weak.ll b/llvm/test/CodeGen/PowerPC/aix-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-weak.ll @@ -122,7 +122,7 @@ ; CHECKSYM-NEXT: SectionLen: 136 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 5 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) ; CHECKSYM32-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll @@ -45,7 +45,7 @@ ; CHECK-NOT: .toc -; CHECK: .csect .text[PR],2 +; CHECK: .csect .text[PR],5 ; CHECK-NEXT: .file ; CHECK: .csect .data[RW],5 @@ -229,7 +229,7 @@ ; SYMS-NEXT: SectionLen: 0 ; SYMS-NEXT: ParameterHashIndex: 0x0 ; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 2 +; SYMS-NEXT: SymbolAlignmentLog2: 5 ; SYMS-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NEXT: StorageMappingClass: XMC_PR (0x0) ; SYMS32-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll @@ -25,7 +25,7 @@ ; CHECK-NEXT: .globl .ext_fun ; CHECK-NEXT: .align 4 ; CHECK-NEXT: .csect ext_fun[DS] -; CHECK: .csect .ext_fun_sec[PR],2 +; CHECK: .csect .ext_fun_sec[PR],5 ; CHECK-NEXT: .ext_fun: ; CHECK: .csect .ext_const_sec[RO],2 ; CHECK-NEXT: .globl ext_const @@ -90,7 +90,7 @@ ; CHECKSYM-NEXT: SectionLen: 28 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 5 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) ; CHECKSYM-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll @@ -34,7 +34,7 @@ ret void } -; ASM: .csect .foo[PR],2 +; ASM: .csect .foo[PR],5 ; ASM-NEXT: .globl foo[DS] # -- Begin function foo ; ASM-NEXT: .globl .foo[PR] ; ASM-NEXT: .align 4 @@ -43,11 +43,11 @@ ; ASM-NEXT: .vbyte {{[0-9]+}}, .foo[PR] ; ASM-NEXT: .vbyte {{[0-9]+}}, TOC[TC0] ; ASM-NEXT: .vbyte {{[0-9]+}}, 0 -; ASM-NEXT: .csect .foo[PR],2 +; ASM-NEXT: .csect .foo[PR],5 ; ASM-NEXT: .alias_foo: ; ASM-NEXT: # %bb.0: # %entry ; ASM-NEXT: blr -; ASM: .csect .hidden_foo[PR],2 +; ASM: .csect .hidden_foo[PR],5 ; ASM-NEXT: .globl hidden_foo[DS],hidden # -- Begin function hidden_foo ; ASM-NEXT: .globl .hidden_foo[PR],hidden ; ASM-NEXT: .align 4 @@ -58,7 +58,7 @@ ; ASM-NEXT: .csect .hidden_foo[PR] ; ASM-NEXT: # %bb.0: # %entry ; ASM-NEXT: blr -; ASM: .csect .bar[PR],2 +; ASM: .csect .bar[PR],5 ; ASM-NEXT: .globl bar[DS] # -- Begin function bar ; ASM-NEXT: .globl .bar[PR] ; ASM-NEXT: .align 4 @@ -66,7 +66,7 @@ ; ASM-NEXT: .vbyte {{[0-9]+}}, .bar[PR] # @bar ; ASM-NEXT: .vbyte {{[0-9]+}}, TOC[TC0] ; ASM-NEXT: .vbyte {{[0-9]+}}, 0 -; ASM-NEXT: .csect .bar[PR],2 +; ASM-NEXT: .csect .bar[PR],5 ; ASM-NEXT: # %bb.0: # %entry ; ASM: bl .foo[PR] ; ASM-NEXT: nop diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir @@ -47,7 +47,7 @@ # SYM-NEXT: SectionLen: 8 # SYM-NEXT: ParameterHashIndex: 0x0 # SYM-NEXT: TypeChkSectNum: 0x0 -# SYM-NEXT: SymbolAlignmentLog2: 4 +# SYM-NEXT: SymbolAlignmentLog2: 5 # SYM-NEXT: SymbolType: XTY_SD (0x1) # SYM-NEXT: StorageMappingClass: XMC_PR (0x0) # SYM-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll @@ -222,7 +222,7 @@ ; SYM-NEXT: SectionLen: 64 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 4 +; SYM-NEXT: SymbolAlignmentLog2: 5 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) ; SYM32-NEXT: StabInfoIndex: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll @@ -54,7 +54,7 @@ ; ASM-NEXT: .vbyte 4, ._Renamed..24f_o # @"f$o" ; ASM-NEXT: .vbyte 4, TOC[TC0] ; ASM-NEXT: .vbyte 4, 0 -; ASM-NEXT: .csect .text[PR],2 +; ASM-NEXT: .csect .text[PR],5 ; ASM-NEXT: ._Renamed..24f_o: ; ASM: bl ._Renamed..40f_o[PR] ; ASM-NEXT: nop @@ -67,7 +67,7 @@ ; ASM-NEXT: .vbyte 4, ._Renamed..26f_o # @"f&o" ; ASM-NEXT: .vbyte 4, TOC[TC0] ; ASM-NEXT: .vbyte 4, 0 -; ASM-NEXT: .csect .text[PR],2 +; ASM-NEXT: .csect .text[PR],5 ; ASM-NEXT: ._Renamed..26f_o: ; ASM: bl ._Renamed..24f_o ; ASM: .globl _Renamed..265ff__o[DS] # -- Begin function f&_o @@ -79,7 +79,7 @@ ; ASM-NEXT: .vbyte 4, ._Renamed..265ff__o # @"f&_o" ; ASM-NEXT: .vbyte 4, TOC[TC0] ; ASM-NEXT: .vbyte 4, 0 -; ASM-NEXT: .csect .text[PR],2 +; ASM-NEXT: .csect .text[PR],5 ; ASM-NEXT: ._Renamed..265ff__o: ; ASM: .csect .data[RW],2 ; ASM-NEXT: .globl _Renamed..60f_o diff --git a/llvm/test/CodeGen/PowerPC/test_func_desc.ll b/llvm/test/CodeGen/PowerPC/test_func_desc.ll --- a/llvm/test/CodeGen/PowerPC/test_func_desc.ll +++ b/llvm/test/CodeGen/PowerPC/test_func_desc.ll @@ -37,7 +37,7 @@ ; 64BIT-NEXT: .vbyte 8, .foo ; 64BIT-NEXT: .vbyte 8, TOC[TC0] ; 64BIT-NEXT: .vbyte 8, 0 -; CHECK-NEXT: .csect .text[PR],2 +; CHECK-NEXT: .csect .text[PR],5 ; CHECK-LABEL: .foo: ; CHECK: .globl main[DS] @@ -50,7 +50,7 @@ ; 64BIT-NEXT: .vbyte 8, .main ; 64BIT-NEXT: .vbyte 8, TOC[TC0] ; 64BIT-NEXT: .vbyte 8, 0 -; CHECK-NEXT: .csect .text[PR],2 +; CHECK-NEXT: .csect .text[PR],5 ; CHECK-LABEL: .main: ; CHECK: bl .foo ; CHECK: bl .extern_foo @@ -66,7 +66,7 @@ ; 64BIT-NEXT: .vbyte 8, .static_foo ; 64BIT-NEXT: .vbyte 8, TOC[TC0] ; 64BIT-NEXT: .vbyte 8, 0 -; CHECK-NEXT: .csect .text[PR],2 +; CHECK-NEXT: .csect .text[PR],5 ; CHECK-LABEL: .static_foo: ; CHECK-NOT: .csect extern_foo diff --git a/llvm/test/DebugInfo/XCOFF/empty.ll b/llvm/test/DebugInfo/XCOFF/empty.ll --- a/llvm/test/DebugInfo/XCOFF/empty.ll +++ b/llvm/test/DebugInfo/XCOFF/empty.ll @@ -35,7 +35,7 @@ !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) !12 = !DILocation(line: 3, column: 3, scope: !8) -; ASM32: .csect .text[PR],2 +; ASM32: .csect .text[PR],5 ; ASM32-NEXT: .file "1.c" ; ASM32-NEXT: .globl main[DS] # -- Begin function main ; ASM32-NEXT: .globl .main @@ -44,7 +44,7 @@ ; ASM32-NEXT: .vbyte 4, .main # @main ; ASM32-NEXT: .vbyte 4, TOC[TC0] ; ASM32-NEXT: .vbyte 4, 0 -; ASM32-NEXT: .csect .text[PR],2 +; ASM32-NEXT: .csect .text[PR],5 ; ASM32-NEXT: .main: ; ASM32-NEXT: L..func_begin0: ; ASM32-NEXT: # %bb.0: # %entry @@ -236,7 +236,7 @@ ; ASM32-NEXT: .byte 1 ; ASM32-NEXT: L..debug_line_end0: -; ASM64: .csect .text[PR],2 +; ASM64: .csect .text[PR],5 ; ASM64-NEXT: .file "1.c" ; ASM64-NEXT: .globl main[DS] # -- Begin function main ; ASM64-NEXT: .globl .main @@ -245,7 +245,7 @@ ; ASM64-NEXT: .vbyte 8, .main # @main ; ASM64-NEXT: .vbyte 8, TOC[TC0] ; ASM64-NEXT: .vbyte 8, 0 -; ASM64-NEXT: .csect .text[PR],2 +; ASM64-NEXT: .csect .text[PR],5 ; ASM64-NEXT: .main: ; ASM64-NEXT: L..func_begin0: ; ASM64-NEXT: # %bb.0: # %entry diff --git a/llvm/test/DebugInfo/XCOFF/explicit-section.ll b/llvm/test/DebugInfo/XCOFF/explicit-section.ll --- a/llvm/test/DebugInfo/XCOFF/explicit-section.ll +++ b/llvm/test/DebugInfo/XCOFF/explicit-section.ll @@ -42,7 +42,7 @@ !15 = !DILocation(line: 3, column: 10, scope: !14) !16 = !DILocation(line: 3, column: 3, scope: !14) -; CHECK: .csect .text[PR],2 +; CHECK: .csect .text[PR],5 ; CHECK-NEXT: .file "2.c" ; CHECK-NEXT: .globl bar[DS] # -- Begin function bar ; CHECK-NEXT: .globl .bar @@ -51,7 +51,7 @@ ; CHECK-NEXT: .vbyte 4, .bar # @bar ; CHECK-NEXT: .vbyte 4, TOC[TC0] ; CHECK-NEXT: .vbyte 4, 0 -; CHECK-NEXT: .csect .text[PR],2 +; CHECK-NEXT: .csect .text[PR],5 ; CHECK-NEXT: .bar: ; CHECK-NEXT: L..func_begin0: ; CHECK-NEXT: # %bb.0: # %entry @@ -80,7 +80,7 @@ ; CHECK-NEXT: .byte "bar" # Function Name ; CHECK-NEXT: L..func_end0: ; CHECK-NEXT: # -- End function -; CHECK-NEXT: .csect explicit_main_sec[PR],2 +; CHECK-NEXT: .csect explicit_main_sec[PR],5 ; CHECK-NEXT: .globl main[DS] # -- Begin function main ; CHECK-NEXT: .globl .main ; CHECK-NEXT: .align 2 @@ -88,7 +88,7 @@ ; CHECK-NEXT: .vbyte 4, .main # @main ; CHECK-NEXT: .vbyte 4, TOC[TC0] ; CHECK-NEXT: .vbyte 4, 0 -; CHECK-NEXT: .csect explicit_main_sec[PR],2 +; CHECK-NEXT: .csect explicit_main_sec[PR],5 ; CHECK-NEXT: .main: ; CHECK-NEXT: L..func_begin1: ; CHECK-NEXT: # %bb.0: # %entry diff --git a/llvm/test/DebugInfo/XCOFF/function-sections.ll b/llvm/test/DebugInfo/XCOFF/function-sections.ll --- a/llvm/test/DebugInfo/XCOFF/function-sections.ll +++ b/llvm/test/DebugInfo/XCOFF/function-sections.ll @@ -37,9 +37,9 @@ !13 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 6, type: !9, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) !14 = !DILocation(line: 8, column: 3, scope: !13) -; CHECK: .csect .text[PR],2 +; CHECK: .csect .text[PR],5 ; CHECK-NEXT: .file "1.c" -; CHECK-NEXT: .csect .foo[PR],2 +; CHECK-NEXT: .csect .foo[PR],5 ; CHECK-NEXT: .globl foo[DS] # -- Begin function foo ; CHECK-NEXT: .globl .foo[PR] ; CHECK-NEXT: .align 2 @@ -47,7 +47,7 @@ ; CHECK-NEXT: .vbyte 4, .foo[PR] # @foo ; CHECK-NEXT: .vbyte 4, TOC[TC0] ; CHECK-NEXT: .vbyte 4, 0 -; CHECK-NEXT: .csect .foo[PR],2 +; CHECK-NEXT: .csect .foo[PR],5 ; CHECK-NEXT: L..func_begin0: ; CHECK-NEXT: # %bb.0: # %entry ; CHECK-NEXT: L..tmp0: @@ -75,7 +75,7 @@ ; CHECK-NEXT: .byte "foo" # Function Name ; CHECK-NEXT: L..func_end0: ; CHECK-NEXT: # -- End function -; CHECK-NEXT: .csect .bar[PR],2 +; CHECK-NEXT: .csect .bar[PR],5 ; CHECK-NEXT: .globl bar[DS] # -- Begin function bar ; CHECK-NEXT: .globl .bar[PR] ; CHECK-NEXT: .align 2 @@ -83,7 +83,7 @@ ; CHECK-NEXT: .vbyte 4, .bar[PR] # @bar ; CHECK-NEXT: .vbyte 4, TOC[TC0] ; CHECK-NEXT: .vbyte 4, 0 -; CHECK-NEXT: .csect .bar[PR],2 +; CHECK-NEXT: .csect .bar[PR],5 ; CHECK-NEXT: L..func_begin1: ; CHECK-NEXT: # %bb.0: # %entry ; CHECK-NEXT: L..tmp3: