Index: llvm/lib/MC/XCOFFObjectWriter.cpp =================================================================== --- llvm/lib/MC/XCOFFObjectWriter.cpp +++ llvm/lib/MC/XCOFFObjectWriter.cpp @@ -808,9 +808,9 @@ void XCOFFObjectWriter::writeRelocation(XCOFFRelocation Reloc, const XCOFFSection &CSection) { if (TargetObjectWriter->is64Bit()) - report_fatal_error("64-bit XCOFF object files are not supported yet."); - - W.write(CSection.Address + Reloc.FixupOffsetInCsect); + W.write(CSection.Address + Reloc.FixupOffsetInCsect); + else + W.write(CSection.Address + Reloc.FixupOffsetInCsect); W.write(Reloc.SymbolTableIndex); W.write(Reloc.SignAndSize); W.write(Reloc.Type); @@ -906,8 +906,10 @@ for (auto &Csect : *Group) { const size_t CsectRelocCount = Csect.Relocations.size(); - if (CsectRelocCount >= XCOFF::RelocOverflow || - Section->RelocationCount >= XCOFF::RelocOverflow - CsectRelocCount) + if (!TargetObjectWriter->is64Bit() && + (CsectRelocCount >= XCOFF::RelocOverflow || + Section->RelocationCount >= + XCOFF::RelocOverflow - CsectRelocCount)) report_fatal_error( "relocation entries overflowed; overflow section is " "not implemented yet"); Index: llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp =================================================================== --- llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp +++ llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp @@ -58,11 +58,12 @@ switch ((unsigned)Fixup.getKind()) { default: report_fatal_error("Unimplemented fixup kind."); + case PPC::fixup_ppc_half16ds: case PPC::fixup_ppc_half16: { const uint8_t SignAndSizeForHalf16 = EncodedSignednessIndicator | 15; switch (Modifier) { default: - report_fatal_error("Unsupported modifier for half16 fixup."); + report_fatal_error("Unsupported modifier for half16/half16ds fixup."); case MCSymbolRefExpr::VK_None: return {XCOFF::RelocationType::R_TOC, SignAndSizeForHalf16}; case MCSymbolRefExpr::VK_PPC_U: @@ -88,5 +89,7 @@ case MCSymbolRefExpr::VK_None: return {XCOFF::RelocationType::R_POS, EncodedSignednessIndicator | 31}; } + case FK_Data_8: + return {XCOFF::RelocationType::R_POS, EncodedSignednessIndicator | 63}; } } Index: llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll +++ llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll @@ -9,31 +9,32 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --symbols %t.o | \ -; RUN: FileCheck --check-prefix=XCOFF32 %s +; RUN: FileCheck --check-prefixes=XCOFF,XCOFF32 %s --match-full-lines -; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o 2>&1 < %s | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --symbols %t.o | \ +; RUN: FileCheck --check-prefixes=XCOFF,XCOFF64 %s --match-full-lines @_ZN3Foo1aE = available_externally constant i32 -1 ; CHECK: .extern _ZN3Foo1aE[UA] -; XCOFF32: Index: [[#Index:]]{{.*}}{{[[:space:]] *}}Name: _ZN3Foo1aE -; XCOFF32-NEXT: Value (RelocatableAddress): 0x0 -; XCOFF32-NEXT: Section: N_UNDEF -; XCOFF32-NEXT: Type: 0x0 -; XCOFF32-NEXT: StorageClass: C_EXT (0x2) -; XCOFF32-NEXT: NumberOfAuxEntries: 1 -; XCOFF32-NEXT: CSECT Auxiliary Entry { -; XCOFF32-NEXT: Index: [[#Index+1]] -; XCOFF32-NEXT: SectionLen: 0 -; XCOFF32-NEXT: ParameterHashIndex: 0x0 -; XCOFF32-NEXT: TypeChkSectNum: 0x0 -; XCOFF32-NEXT: SymbolAlignmentLog2: 0 -; XCOFF32-NEXT: SymbolType: XTY_ER (0x0) -; XCOFF32-NEXT: StorageMappingClass: XMC_UA (0x4) -; XCOFF32-NEXT: StabInfoIndex: 0x0 -; XCOFF32-NEXT: StabSectNum: 0x0 -; XCOFF32-NEXT: } +; XCOFF: Index: [[#Index:]]{{.*}}{{[[:space:]] *}}Name: _ZN3Foo1aE +; XCOFF-NEXT: Value (RelocatableAddress): 0x0 +; XCOFF-NEXT: Section: N_UNDEF +; XCOFF-NEXT: Type: 0x0 +; XCOFF-NEXT: StorageClass: C_EXT (0x2) +; XCOFF-NEXT: NumberOfAuxEntries: 1 +; XCOFF-NEXT: CSECT Auxiliary Entry { +; XCOFF-NEXT: Index: [[#Index+1]] +; XCOFF-NEXT: SectionLen: 0 +; XCOFF-NEXT: ParameterHashIndex: 0x0 +; XCOFF-NEXT: TypeChkSectNum: 0x0 +; XCOFF-NEXT: SymbolAlignmentLog2: 0 +; XCOFF-NEXT: SymbolType: XTY_ER (0x0) +; XCOFF-NEXT: StorageMappingClass: XMC_UA (0x4) +; XCOFF32-NEXT: StabInfoIndex: 0x0 +; XCOFF32-NEXT: StabSectNum: 0x0 +; XCOFF64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; XCOFF-NEXT: } Index: llvm/test/CodeGen/PowerPC/aix-extern-weak.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-extern-weak.ll +++ llvm/test/CodeGen/PowerPC/aix-extern-weak.ll @@ -6,13 +6,11 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s - -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o 2>&1 < %s | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM32 %s --match-full-lines +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM64 %s --match-full-lines @foo_ext_weak_p = global void (...)* bitcast (void ()* @foo_ext_weak_ref to void (...)*) @b_w = extern_weak global i32 @@ -88,8 +86,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -108,8 +107,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -128,8 +128,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_UA (0x4) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -148,8 +149,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -168,8 +170,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -188,8 +191,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -208,8 +212,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -222,14 +227,17 @@ ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+15]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -248,34 +256,40 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+18]] ; CHECKSYM-NEXT: Name: main -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x54 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x54 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x58 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+19]] -; CHECKSYM-NEXT: SectionLen: 12 +; CHECKSYM32-NEXT: SectionLen: 12 +; CHECKSYM64-NEXT: SectionLen: 24 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+20]] ; CHECKSYM-NEXT: Name: TOC -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x60 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x60 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x70 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) @@ -288,48 +302,57 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC0 (0xF) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+22]] ; CHECKSYM-NEXT: Name: foo_ext_weak_p -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x60 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x60 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x70 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+23]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+24]] ; CHECKSYM-NEXT: Name: b_w -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x64 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x64 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x78 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+25]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: ] Index: llvm/test/CodeGen/PowerPC/aix-extern.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-extern.ll +++ llvm/test/CodeGen/PowerPC/aix-extern.ll @@ -6,11 +6,11 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM32 %s --match-full-lines -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o 2>&1 < %s | FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM64 %s --match-full-lines @bar_p = global i32 (...)* @bar_ref, align 4 @b_e = external global i32, align 4 @@ -109,8 +109,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -129,8 +130,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -149,8 +151,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -169,8 +172,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_UA (0x4) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -189,8 +193,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -209,8 +214,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -229,8 +235,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -249,8 +256,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -263,14 +271,17 @@ ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+17]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -289,54 +300,64 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+20]] ; CHECKSYM-NEXT: Name: foo -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x74 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x74 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x78 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+21]] -; CHECKSYM-NEXT: SectionLen: 12 +; CHECKSYM32-NEXT: SectionLen: 12 +; CHECKSYM64-NEXT: SectionLen: 24 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+22]] ; CHECKSYM-NEXT: Name: main -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x80 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x80 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x90 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+23]] -; CHECKSYM-NEXT: SectionLen: 12 +; CHECKSYM32-NEXT: SectionLen: 12 +; CHECKSYM64-NEXT: SectionLen: 24 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+24]] ; CHECKSYM-NEXT: Name: TOC -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x8C +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x8C +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xA8 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) @@ -349,48 +370,57 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC0 (0xF) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+26]] ; CHECKSYM-NEXT: Name: b_e -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x8C +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x8C +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xA8 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+27]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+28]] ; CHECKSYM-NEXT: Name: bar_p -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x90 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x90 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xB0 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+29]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: ] Index: llvm/test/CodeGen/PowerPC/aix-func-align.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-func-align.ll +++ llvm/test/CodeGen/PowerPC/aix-func-align.ll @@ -7,11 +7,11 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \ ; RUN: -xcoff-traceback-table=false -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32 %s --match-full-lines -; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -xcoff-traceback-table=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS64 %s --match-full-lines define i32 @foo() align 32 { entry: @@ -43,7 +43,8 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 6 ; SYMS-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NEXT: StorageMappingClass: XMC_PR (0x0) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } Index: llvm/test/CodeGen/PowerPC/aix-internal.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-internal.ll +++ llvm/test/CodeGen/PowerPC/aix-internal.ll @@ -1,8 +1,10 @@ ; RUN: llc -mtriple powerpc-ibm-aix -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \ ; RUN: -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --syms %t.o | FileCheck %s -; RUN: not --crash llc -mtriple powerpc64-ibm-aix -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \ -; RUN: -filetype=obj -o %t.o < %s 2>&1 | FileCheck --check-prefix=64-CHECK %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=CHECK,CHECK32 %s + +; RUN: llc -mtriple powerpc64-ibm-aix -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \ +; RUN: -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=CHECK,CHECK64 %s define internal i32 @foo() { ret i32 1 @@ -16,23 +18,22 @@ ; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) ; CHECK: Symbol { -; CHECK-NEXT: Index: [[#INDX:]] -; CHECK-NEXT: Name: foo -; CHECK-NEXT: Value (RelocatableAddress): -; CHECK-NEXT: Section: .data -; CHECK-NEXT: Type: 0x0 -; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) -; CHECK-NEXT: NumberOfAuxEntries: 1 -; CHECK-NEXT: CSECT Auxiliary Entry { -; CHECK-NEXT: Index: [[#INDX+1]] -; CHECK-NEXT: SectionLen: 12 -; CHECK-NEXT: ParameterHashIndex: -; CHECK-NEXT: TypeChkSectNum: -; CHECK-NEXT: SymbolAlignmentLog2: -; CHECK-NEXT: SymbolType: XTY_SD (0x1) -; CHECK-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECK-NEXT: Index: [[#INDX:]] +; CHECK-NEXT: Name: foo +; CHECK-NEXT: Value (RelocatableAddress): +; CHECK-NEXT: Section: .data +; CHECK-NEXT: Type: 0x0 +; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECK-NEXT: NumberOfAuxEntries: 1 +; CHECK-NEXT: CSECT Auxiliary Entry { +; CHECK-NEXT: Index: [[#INDX+1]] +; CHECK32-NEXT: SectionLen: 12 +; CHECK64-NEXT: SectionLen: 24 +; CHECK-NEXT: ParameterHashIndex: +; CHECK-NEXT: TypeChkSectNum: +; CHECK-NEXT: SymbolAlignmentLog2: +; CHECK-NEXT: SymbolType: XTY_SD (0x1) +; CHECK-NEXT: StorageMappingClass: XMC_DS (0xA) ; Make sure no label is emitted. ; CHECK-NOT: Name: foo - -;64-CHECK: LLVM ERROR: 64-bit XCOFF object files are not supported yet. Index: llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll +++ llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll @@ -6,13 +6,14 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM32 %s --match-full-lines ; RUN: llvm-objdump -r -d --symbol-description %t.o | FileCheck --check-prefix=CHECKRELOC %s -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mattr=-altivec -filetype=obj -o %t.o 2>&1 < %s | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM64 %s --match-full-lines +; RUN: not --crash llvm-objdump -r -d --symbol-description %t.o 2>&1 | FileCheck --check-prefix=XCOFF64 %s +; XCOFF64: LLVM ERROR: 64-bit support not implemented yet %struct.S = type { i32, i32 } @@ -63,8 +64,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_ER (0x0) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } Index: llvm/test/CodeGen/PowerPC/aix-overflow-toc.py =================================================================== --- llvm/test/CodeGen/PowerPC/aix-overflow-toc.py +++ llvm/test/CodeGen/PowerPC/aix-overflow-toc.py @@ -11,10 +11,10 @@ # RUN: -filetype=obj -o %t.o < %t.ll # RUN: llvm-objdump -D -r --symbol-description %t.o | FileCheck --check-prefix=DIS32 %s -# RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \ -# RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o 2>&1 < %t.ll | \ -# RUN: FileCheck --check-prefix=XCOFF64 %s -# XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +# RUN: llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \ +# RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o < %t.ll +# RUN: not --crash llvm-objdump -D -r --symbol-description %t.o 2>&1 | FileCheck --check-prefix=XCOFF64 %s +# XCOFF64: LLVM ERROR: 64-bit support not implemented yet numentries = 12290 for x in range(0, numentries): Index: llvm/test/CodeGen/PowerPC/aix-return55.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-return55.ll +++ llvm/test/CodeGen/PowerPC/aix-return55.ll @@ -2,12 +2,15 @@ ; RUN: -verify-machineinstrs -data-sections=false -xcoff-traceback-table=false < %s | FileCheck %s ; RUN: llc -mcpu=pwr4 -mattr=-altivec -mtriple=powerpc-ibm-aix-xcoff \ ; RUN: -verify-machineinstrs -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s -; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s -; RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=CHECKSECT %s +; RUN: llvm-objdump -D %t.o | FileCheck --check-prefixes=CHECKOBJ,CHECKOBJ32 %s +; RUN: llvm-readobj -S %t.o | FileCheck --check-prefixes=CHECKSECT,CHECKSECT32 %s --match-full-lines -; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -mcpu=pwr4 -mattr=-altivec -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -verify-machineinstrs -data-sections=false -xcoff-traceback-table=false < %s | FileCheck %s +; RUN: llc -mcpu=pwr4 -mattr=-altivec -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -verify-machineinstrs -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s +; RUN: llvm-objdump -D %t.o | FileCheck --check-prefixes=CHECKOBJ,CHECKOBJ64 %s +; RUN: llvm-readobj -S %t.o | FileCheck --check-prefixes=CHECKSECT,CHECKSECT64 %s --match-full-lines @a = global i64 320255973571806, align 8 @d = global double 5.000000e+00, align 8 @@ -36,9 +39,12 @@ ;CHECKOBJ-NEXT: 20: 40 14 00 00 bdnzf 20, 0x20 ;CHECKOBJ-NEXT: 24: 00 00 00 00 {{[[:space:]] *}} ;CHECKOBJ-NEXT: 00000028 : -;CHECKOBJ-NEXT: 28: 00 00 00 00 -;CHECKOBJ-NEXT: 2c: 00 00 00 34 -;CHECKOBJ-NEXT: 30: 00 00 00 00 +;CHECKOBJ32-NEXT: 28: 00 00 00 00 +;CHECKOBJ32-NEXT: 2c: 00 00 00 34 +;CHECKOBJ32-NEXT: 30: 00 00 00 00 +;CHECKOBJ64-NEXT: ... +;CHECKOBJ64-NEXT: 34: 00 00 00 40 +;CHECKOBJ64-NEXT: ... ;CHECKSECT: Sections [ ;CHECKSECT-NEXT: Section { @@ -47,7 +53,8 @@ ;CHECKSECT-NEXT: PhysicalAddress: 0x0 ;CHECKSECT-NEXT: VirtualAddress: 0x0 ;CHECKSECT-NEXT: Size: 0x14 -;CHECKSECT-NEXT: RawDataOffset: 0x64 +;CHECKSECT32-NEXT: RawDataOffset: 0x64 +;CHECKSECT64-NEXT: RawDataOffset: 0xA8 ;CHECKSECT-NEXT: RelocationPointer: 0x0 ;CHECKSECT-NEXT: LineNumberPointer: 0x0 ;CHECKSECT-NEXT: NumberOfRelocations: 0 @@ -59,9 +66,12 @@ ;CHECKSECT-NEXT: Name: .data ;CHECKSECT-NEXT: PhysicalAddress: 0x18 ;CHECKSECT-NEXT: VirtualAddress: 0x18 -;CHECKSECT-NEXT: Size: 0x1C -;CHECKSECT-NEXT: RawDataOffset: 0x78 -;CHECKSECT-NEXT: RelocationPointer: 0x94 +;CHECKSECT32-NEXT: Size: 0x1C +;CHECKSECT32-NEXT: RawDataOffset: 0x78 +;CHECKSECT32-NEXT: RelocationPointer: 0x94 +;CHECKSECT64-NEXT: Size: 0x28 +;CHECKSECT64-NEXT: RawDataOffset: 0xBC +;CHECKSECT64-NEXT: RelocationPointer: 0xE4 ;CHECKSECT-NEXT: LineNumberPointer: 0x0 ;CHECKSECT-NEXT: NumberOfRelocations: 2 ;CHECKSECT-NEXT: NumberOfLineNumbers: 0 Index: llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll +++ llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll @@ -1,22 +1,32 @@ ; This file tests the codegen of tls variables in AIX XCOFF object files ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=SECTION %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS-DATASECT %s -; RUN: llvm-objdump -D --symbol-description %t.o | FileCheck --check-prefixes=OBJDUMP-DATASECT %s +; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefixes=SECTION,SECT32 %s --match-full-lines +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32,SYMS-DATASECT %s --match-full-lines +; RUN: llvm-objdump -D --symbol-description %t.o | FileCheck --check-prefix=OBJDUMP-DATASECT %s ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=SECTION %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS-NODATASECT %s -; RUN: llvm-objdump -D --symbol-description %t.o | FileCheck --check-prefixes=OBJDUMP-NODATASECT %s +; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefixes=SECTION,SECT32 %s --match-full-lines +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32,SYMS-NODATASECT,SYMS-NODATASECT32 %s --match-full-lines +; RUN: llvm-objdump -D --symbol-description %t.o | FileCheck --check-prefix=OBJDUMP-NODATASECT %s -; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefixes=SECTION,SECT64 %s --match-full-lines +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS64,SYMS-DATASECT %s --match-full-lines +; RUN: llvm-objdump -D --symbol-description %t.o | FileCheck --check-prefix=OBJDUMP-DATASECT %s + +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefixes=SECTION,SECT64 %s --match-full-lines +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS64,SYMS-NODATASECT,SYMS-NODATASECT64 %s --match-full-lines +; RUN: llvm-objdump -D --symbol-description %t.o | FileCheck --check-prefix=OBJDUMP-NODATASECT %s ; SECTION: File: {{.*}}aix-tls-xcoff-variables.ll.tmp.o -; SECTION-NEXT: Format: aixcoff-rs6000 -; SECTION-NEXT: Arch: powerpc -; SECTION-NEXT: AddressSize: 32bit +; SECT32-NEXT: Format: aixcoff-rs6000 +; SECT32-NEXT: Arch: powerpc +; SECT32-NEXT: AddressSize: 32bit +; SECT64-NEXT: Format: aix5coff64-rs6000 +; SECT64-NEXT: Arch: powerpc64 +; SECT64-NEXT: AddressSize: 64bit ; SECTION-NEXT: Sections [ ; SECTION-NEXT: Section { ; SECTION-NEXT: Index: 1 @@ -24,7 +34,8 @@ ; SECTION-NEXT: PhysicalAddress: 0x0 ; SECTION-NEXT: VirtualAddress: 0x0 ; SECTION-NEXT: Size: 0x4 -; SECTION-NEXT: RawDataOffset: 0x8C +; SECT32-NEXT: RawDataOffset: 0x8C +; SECT64-NEXT: RawDataOffset: 0xF0 ; SECTION-NEXT: RelocationPointer: 0x0 ; SECTION-NEXT: LineNumberPointer: 0x0 ; SECTION-NEXT: NumberOfRelocations: 0 @@ -37,7 +48,8 @@ ; SECTION-NEXT: PhysicalAddress: 0x0 ; SECTION-NEXT: VirtualAddress: 0x0 ; SECTION-NEXT: Size: 0x30 -; SECTION-NEXT: RawDataOffset: 0x90 +; SECT32-NEXT: RawDataOffset: 0x90 +; SECT64-NEXT: RawDataOffset: 0xF4 ; SECTION-NEXT: RelocationPointer: 0x0 ; SECTION-NEXT: LineNumberPointer: 0x0 ; SECTION-NEXT: NumberOfRelocations: 0 @@ -60,61 +72,67 @@ ; SECTION-NEXT: ] -; SYMS: File: {{.*}}aix-tls-xcoff-variables.ll.tmp.o -; SYMS-NEXT: Format: aixcoff-rs6000 -; SYMS-NEXT: Arch: powerpc -; SYMS-NEXT: AddressSize: 32bit -; SYMS-NEXT: Symbols [ -; SYMS-NEXT: Symbol { -; SYMS-NEXT: Index: 0 -; SYMS-NEXT: Name: .file -; SYMS-NEXT: Value (SymbolTableIndex): 0x0 -; SYMS-NEXT: Section: N_DEBUG -; SYMS-NEXT: Source Language ID: TB_C (0x0) -; SYMS-NEXT: CPU Version ID: 0x0 -; SYMS-NEXT: StorageClass: C_FILE (0x67) -; SYMS-NEXT: NumberOfAuxEntries: 0 -; SYMS-NEXT: } -; SYMS-NEXT: Symbol { -; SYMS-NEXT: Index: [[#INDX:]] -; SYMS-NEXT: Name: tls_global_int_external_uninitialized -; SYMS-NEXT: Value (RelocatableAddress): 0x0 -; SYMS-NEXT: Section: N_UNDEF -; SYMS-NEXT: Type: 0x0 -; SYMS-NEXT: StorageClass: C_EXT (0x2) -; SYMS-NEXT: NumberOfAuxEntries: 1 -; SYMS-NEXT: CSECT Auxiliary Entry { -; SYMS-NEXT: Index: [[#INDX+1]] -; SYMS-NEXT: SectionLen: 0 -; SYMS-NEXT: ParameterHashIndex: 0x0 -; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 0 -; SYMS-NEXT: SymbolType: XTY_ER (0x0) -; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS: File: {{.*}}aix-tls-xcoff-variables.ll.tmp.o +; SYMS32-NEXT: Format: aixcoff-rs6000 +; SYMS32-NEXT: Arch: powerpc +; SYMS32-NEXT: AddressSize: 32bit +; SYMS64-NEXT: Format: aix5coff64-rs6000 +; SYMS64-NEXT: Arch: powerpc64 +; SYMS64-NEXT: AddressSize: 64bit +; SYMS-NEXT: Symbols [ +; SYMS-NEXT: Symbol { +; SYMS-NEXT: Index: 0 +; SYMS-NEXT: Name: .file +; SYMS-NEXT: Value (SymbolTableIndex): 0x0 +; SYMS-NEXT: Section: N_DEBUG +; SYMS-NEXT: Source Language ID: TB_C (0x0) +; SYMS-NEXT: CPU Version ID: 0x0 +; SYMS-NEXT: StorageClass: C_FILE (0x67) +; SYMS-NEXT: NumberOfAuxEntries: 0 ; SYMS-NEXT: } -; SYMS-NEXT: } -; SYMS-NEXT: Symbol { -; SYMS-NEXT: Index: [[#INDX+2]] -; SYMS-NEXT: Name: tls_global_double_external_uninitialized -; SYMS-NEXT: Value (RelocatableAddress): 0x0 -; SYMS-NEXT: Section: N_UNDEF -; SYMS-NEXT: Type: 0x0 -; SYMS-NEXT: StorageClass: C_EXT (0x2) -; SYMS-NEXT: NumberOfAuxEntries: 1 -; SYMS-NEXT: CSECT Auxiliary Entry { -; SYMS-NEXT: Index: [[#INDX+3]] -; SYMS-NEXT: SectionLen: 0 -; SYMS-NEXT: ParameterHashIndex: 0x0 -; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 0 -; SYMS-NEXT: SymbolType: XTY_ER (0x0) -; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS-NEXT: Symbol { +; SYMS-NEXT: Index: [[#INDX:]] +; SYMS-NEXT: Name: tls_global_int_external_uninitialized +; SYMS-NEXT: Value (RelocatableAddress): 0x0 +; SYMS-NEXT: Section: N_UNDEF +; SYMS-NEXT: Type: 0x0 +; SYMS-NEXT: StorageClass: C_EXT (0x2) +; SYMS-NEXT: NumberOfAuxEntries: 1 +; SYMS-NEXT: CSECT Auxiliary Entry { +; SYMS-NEXT: Index: [[#INDX+1]] +; SYMS-NEXT: SectionLen: 0 +; SYMS-NEXT: ParameterHashIndex: 0x0 +; SYMS-NEXT: TypeChkSectNum: 0x0 +; SYMS-NEXT: SymbolAlignmentLog2: 0 +; SYMS-NEXT: SymbolType: XTY_ER (0x0) +; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) + +; SYMS-NEXT: } +; SYMS-NEXT: } +; SYMS-NEXT: Symbol { +; SYMS-NEXT: Index: [[#INDX+2]] +; SYMS-NEXT: Name: tls_global_double_external_uninitialized +; SYMS-NEXT: Value (RelocatableAddress): 0x0 +; SYMS-NEXT: Section: N_UNDEF +; SYMS-NEXT: Type: 0x0 +; SYMS-NEXT: StorageClass: C_EXT (0x2) +; SYMS-NEXT: NumberOfAuxEntries: 1 +; SYMS-NEXT: CSECT Auxiliary Entry { +; SYMS-NEXT: Index: [[#INDX+3]] +; SYMS-NEXT: SectionLen: 0 +; SYMS-NEXT: ParameterHashIndex: 0x0 +; SYMS-NEXT: TypeChkSectNum: 0x0 +; SYMS-NEXT: SymbolAlignmentLog2: 0 +; SYMS-NEXT: SymbolType: XTY_ER (0x0) +; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS-NEXT: } ; SYMS-NEXT: } -; SYMS-NEXT: } ; SYMS-NEXT: Symbol { ; SYMS-NEXT: Index: [[#INDX+4]] @@ -132,8 +150,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 2 ; SYMS-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NEXT: StorageMappingClass: XMC_PR (0x0) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -153,8 +172,9 @@ ; SYMS-NODATASECT-NEXT: SymbolAlignmentLog2: 2 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NODATASECT-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NODATASECT-NEXT: StabInfoIndex: 0x0 -; SYMS-NODATASECT-NEXT: StabSectNum: 0x0 +; SYMS-NODATASECT32-NEXT: StabInfoIndex: 0x0 +; SYMS-NODATASECT32-NEXT: StabSectNum: 0x0 +; SYMS-NODATASECT64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NODATASECT-NEXT: } ; SYMS-NODATASECT-NEXT: } @@ -179,8 +199,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -200,8 +221,9 @@ ; SYMS-NODATASECT-NEXT: SymbolAlignmentLog2: 3 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NODATASECT-NEXT: StorageMappingClass: XMC_TL (0x14) -; SYMS-NODATASECT-NEXT: StabInfoIndex: 0x0 -; SYMS-NODATASECT-NEXT: StabSectNum: 0x0 +; SYMS-NODATASECT32-NEXT: StabInfoIndex: 0x0 +; SYMS-NODATASECT32-NEXT: StabSectNum: 0x0 +; SYMS-NODATASECT64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NODATASECT-NEXT: } ; SYMS-NODATASECT-NEXT: } @@ -226,8 +248,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -250,8 +273,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -276,8 +300,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -302,8 +327,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -328,8 +354,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -354,8 +381,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -380,8 +408,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -406,8 +435,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -432,8 +462,9 @@ ; SYMS-NODATASECT: SymbolAlignmentLog2: 0 ; SYMS-NODATASECT-NEXT: SymbolType: XTY_LD (0x2) ; SYMS: StorageMappingClass: XMC_TL (0x14) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -455,8 +486,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 2 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -478,8 +510,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 2 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -501,8 +534,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 3 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -524,8 +558,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 3 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_UL (0x15) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } Index: llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll +++ llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll @@ -1,20 +1,27 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -filetype=obj -xcoff-traceback-table=false -o %t.o < %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=32-SYM %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYM,SYM32 %s --match-full-lines ; RUN: llvm-readobj --relocs --expand-relocs %t.o | FileCheck \ ; RUN: --check-prefix=32-REL %s -; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=32-DIS %s +; RUN: llvm-objdump -D %t.o | FileCheck --check-prefixes=DIS,DIS32 %s ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ ; RUN: -mcpu=pwr4 -mattr=-altivec < %s | \ ; RUN: FileCheck %s -; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj < %s 2>&1 | FileCheck \ -; RUN: --check-prefix=64-CHECK %s +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -filetype=obj -xcoff-traceback-table=false -o %t.o < %s + +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYM,SYM64 %s --match-full-lines + +; RUN: llvm-objdump -D %t.o | FileCheck --check-prefixes=DIS,DIS64 %s + +; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ +; RUN: -mcpu=pwr4 -mattr=-altivec < %s | \ +; RUN: FileCheck %s ; Test verifies: ; If there exists a user-defined function whose name is the same as the @@ -41,26 +48,27 @@ ; CHECK-NOT: .extern .memcpy -; 32-SYM: Symbol {{[{][[:space:]] *}}Index: [[#Index:]]{{[[:space:]] *}}Name: .memcpy -; 32-SYM-NEXT: Value (RelocatableAddress): 0x0 -; 32-SYM-NEXT: Section: .text -; 32-SYM-NEXT: Type: 0x0 -; 32-SYM-NEXT: StorageClass: C_EXT (0x2) -; 32-SYM-NEXT: NumberOfAuxEntries: 1 -; 32-SYM-NEXT: CSECT Auxiliary Entry { -; 32-SYM-NEXT: Index: 4 -; 32-SYM-NEXT: ContainingCsectSymbolIndex: 1 -; 32-SYM-NEXT: ParameterHashIndex: 0x0 -; 32-SYM-NEXT: TypeChkSectNum: 0x0 -; 32-SYM-NEXT: SymbolAlignmentLog2: 0 -; 32-SYM-NEXT: SymbolType: XTY_LD (0x2) -; 32-SYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; 32-SYM-NEXT: StabInfoIndex: 0x0 -; 32-SYM-NEXT: StabSectNum: 0x0 -; 32-SYM-NEXT: } -; 32-SYM-NEXT: } - -; 32-SYM-NOT: .memcpy +; SYM: Symbol {{[{][[:space:]] *}}Index: [[#Index:]]{{[[:space:]] *}}Name: .memcpy +; SYM-NEXT: Value (RelocatableAddress): 0x0 +; SYM-NEXT: Section: .text +; SYM-NEXT: Type: 0x0 +; SYM-NEXT: StorageClass: C_EXT (0x2) +; SYM-NEXT: NumberOfAuxEntries: 1 +; SYM-NEXT: CSECT Auxiliary Entry { +; SYM-NEXT: Index: 4 +; SYM-NEXT: ContainingCsectSymbolIndex: 1 +; SYM-NEXT: ParameterHashIndex: 0x0 +; SYM-NEXT: TypeChkSectNum: 0x0 +; SYM-NEXT: SymbolAlignmentLog2: 0 +; SYM-NEXT: SymbolType: XTY_LD (0x2) +; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM-NEXT: } +; SYM-NEXT: } + +; SYM-NOT: .memcpy ; 32-REL: Relocations [ ; 32-REL-NEXT: Section (index: 2) .data { @@ -101,21 +109,23 @@ ; 32-REL-NOT: Type: R_RBR (0x1A) -; 32-DIS: Disassembly of section .text: -; 32-DIS: 00000000 <.text>: -; 32-DIS-NEXT: 0: 38 60 00 03 li 3, 3 -; 32-DIS-NEXT: 4: 4e 80 00 20 blr -; 32-DIS-NEXT: 8: 60 00 00 00 nop -; 32-DIS-NEXT: c: 60 00 00 00 nop -; 32-DIS: 00000010 <.call_memcpy>: -; 32-DIS-NEXT: 10: 7c 08 02 a6 mflr 0 -; 32-DIS-NEXT: 14: 90 01 00 08 stw 0, 8(1) -; 32-DIS-NEXT: 18: 94 21 ff c0 stwu 1, -64(1) -; 32-DIS-NEXT: 1c: 4b ff ff e5 bl 0x0 -; 32-DIS-NEXT: 20: 60 00 00 00 nop -; 32-DIS-NEXT: 24: 38 21 00 40 addi 1, 1, 64 -; 32-DIS-NEXT: 28: 80 01 00 08 lwz 0, 8(1) -; 32-DIS-NEXT: 2c: 7c 08 03 a6 mtlr 0 -; 32-DIS-NEXT: 30: 4e 80 00 20 blr - -; 64-CHECK: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; DIS: Disassembly of section .text: +; DIS: 00000000 <.text>: +; DIS-NEXT: 0: 38 60 00 03 li 3, 3 +; DIS-NEXT: 4: 4e 80 00 20 blr +; DIS-NEXT: 8: 60 00 00 00 nop +; DIS-NEXT: c: 60 00 00 00 nop +; DIS: 00000010 <.call_memcpy>: +; DIS-NEXT: 10: 7c 08 02 a6 mflr 0 +; DIS32: 14: 90 01 00 08 stw 0, 8(1) +; DIS32-NEXT: 18: 94 21 ff c0 stwu 1, -64(1) +; DIS64: 14: f8 01 00 10 std 0, 16(1) +; DIS64-NEXT: 18: f8 21 ff 91 stdu 1, -112(1) +; DIS-NEXT: 1c: 4b ff ff e5 bl 0x0 +; DIS-NEXT: 20: 60 00 00 00 nop +; DIS32: 24: 38 21 00 40 addi 1, 1, 64 +; DIS32-NEXT: 28: 80 01 00 08 lwz 0, 8(1) +; DIS64: 24: 38 21 00 70 addi 1, 1, 112 +; DIS64-NEXT: 28: e8 01 00 10 ld 0, 16(1) +; DIS-NEXT: 2c: 7c 08 03 a6 mtlr 0 +; DIS-NEXT: 30: 4e 80 00 20 blr Index: llvm/test/CodeGen/PowerPC/aix-weak.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-weak.ll +++ llvm/test/CodeGen/PowerPC/aix-weak.ll @@ -6,12 +6,11 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -xcoff-traceback-table=false -mcpu=pwr4 \ ; RUN: -mattr=-altivec -data-sections=false -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM32 %s --match-full-lines -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mattr=-altivec -data-sections=false -filetype=obj -o %t.o 2>&1 < %s | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -xcoff-traceback-table=false -mcpu=pwr4 \ +; RUN: -mattr=-altivec -data-sections=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefixes=CHECKSYM,CHECKSYM64 %s --match-full-lines @foo_weak_p = global void (...)* bitcast (void ()* @foo_ref_weak to void (...)*), align 4 @b = weak global i32 0, align 4 @@ -126,8 +125,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -146,8 +146,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -166,8 +167,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -186,8 +188,9 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -200,14 +203,17 @@ ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+9]] -; CHECKSYM-NEXT: SectionLen: 8 +; CHECKSYM32-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: SectionLen: 12 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { @@ -226,14 +232,16 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+12]] ; CHECKSYM-NEXT: Name: b -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x8C +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x8C +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x90 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_WEAKEXT (0x6F) @@ -246,74 +254,88 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 ; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) ; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+14]] ; CHECKSYM-NEXT: Name: foo_weak -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x90 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x90 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x98 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_WEAKEXT (0x6F) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+15]] -; CHECKSYM-NEXT: SectionLen: 12 +; CHECKSYM32-NEXT: SectionLen: 12 +; CHECKSYM64-NEXT: SectionLen: 24 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+16]] ; CHECKSYM-NEXT: Name: foo_ref_weak -; CHECKSYM-NEXT: Value (RelocatableAddress): 0x9C +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0x9C +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xB0 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_WEAKEXT (0x6F) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+17]] -; CHECKSYM-NEXT: SectionLen: 12 +; CHECKSYM32-NEXT: SectionLen: 12 +; CHECKSYM64-NEXT: SectionLen: 24 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+18]] ; CHECKSYM-NEXT: Name: main -; CHECKSYM-NEXT: Value (RelocatableAddress): 0xA8 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0xA8 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xC8 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+19]] -; CHECKSYM-NEXT: SectionLen: 12 +; CHECKSYM32-NEXT: SectionLen: 12 +; CHECKSYM64-NEXT: SectionLen: 24 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+20]] ; CHECKSYM-NEXT: Name: TOC -; CHECKSYM-NEXT: Value (RelocatableAddress): 0xB4 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0xB4 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xE0 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) @@ -326,48 +348,57 @@ ; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC0 (0xF) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+22]] ; CHECKSYM-NEXT: Name: foo_weak_p -; CHECKSYM-NEXT: Value (RelocatableAddress): 0xB4 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0xB4 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xE0 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+23]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+24]] ; CHECKSYM-NEXT: Name: b -; CHECKSYM-NEXT: Value (RelocatableAddress): 0xB8 +; CHECKSYM32-NEXT: Value (RelocatableAddress): 0xB8 +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xE8 ; CHECKSYM-NEXT: Section: .data ; CHECKSYM-NEXT: Type: 0x0 ; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) ; CHECKSYM-NEXT: NumberOfAuxEntries: 1 ; CHECKSYM-NEXT: CSECT Auxiliary Entry { ; CHECKSYM-NEXT: Index: [[#Index+25]] -; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM32-NEXT: SectionLen: 4 +; CHECKSYM64-NEXT: SectionLen: 8 ; CHECKSYM-NEXT: ParameterHashIndex: 0x0 ; CHECKSYM-NEXT: TypeChkSectNum: 0x0 -; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM32-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 ; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) ; CHECKSYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; CHECKSYM-NEXT: StabInfoIndex: 0x0 -; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM32-NEXT: StabInfoIndex: 0x0 +; CHECKSYM32-NEXT: StabSectNum: 0x0 +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: ] Index: llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll @@ -1,12 +1,11 @@ ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s -; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck %s +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s -; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=OBJ64 %s -; OBJ64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s @a = external global i32, align 4 @b = external global i64, align 8 Index: llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll @@ -6,12 +6,13 @@ ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --section-headers --file-header %t.o | \ -; RUN: FileCheck --check-prefix=OBJ %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s +; RUN: FileCheck --check-prefixes=OBJ,OBJ32 %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32 %s --match-full-lines -; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --section-headers --file-header %t.o | \ +; RUN: FileCheck --check-prefixes=OBJ,OBJ64 %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS64 %s --match-full-lines @ivar = local_unnamed_addr global i32 35, align 4 @llvar = local_unnamed_addr global i64 36, align 8 @@ -146,19 +147,24 @@ ; CHECK-NEXT: .comm over_aligned_comm[RW],8,5 ; CHECK-NEXT: .comm array[RW],33,0 -; OBJ: File: {{.*}}aix-xcoff-data.ll.tmp.o -; OBJ-NEXT: Format: aixcoff-rs6000 -; OBJ-NEXT: Arch: powerpc -; OBJ-NEXT: AddressSize: 32bit -; OBJ-NEXT: FileHeader { -; OBJ-NEXT: Magic: 0x1DF -; OBJ-NEXT: NumberOfSections: 3 -; OBJ-NEXT: TimeStamp: -; OBJ-NEXT: SymbolTableOffset: 0x10C -; OBJ-NEXT: SymbolTableEntries: 45 -; OBJ-NEXT: OptionalHeaderSize: 0x0 -; OBJ-NEXT: Flags: 0x0 -; OBJ-NEXT: } +; OBJ: File: {{.*}}aix-xcoff-data.ll.tmp.o +; OBJ32-NEXT: Format: aixcoff-rs6000 +; OBJ32-NEXT: Arch: powerpc +; OBJ32-NEXT: AddressSize: 32bit +; OBJ64-NEXT: Format: aix5coff64-rs6000 +; OBJ64-NEXT: Arch: powerpc64 +; OBJ64-NEXT: AddressSize: 64bit +; OBJ-NEXT: FileHeader { +; OBJ32-NEXT: Magic: 0x1DF +; OBJ64-NEXT: Magic: 0x1F7 +; OBJ-NEXT: NumberOfSections: 3 +; OBJ-NEXT: TimeStamp: +; OBJ32-NEXT: SymbolTableOffset: 0x10C +; OBJ64-NEXT: SymbolTableOffset: 0x170 +; OBJ-NEXT: SymbolTableEntries: 45 +; OBJ-NEXT: OptionalHeaderSize: 0x0 +; OBJ-NEXT: Flags: 0x0 +; OBJ-NEXT: } ; OBJ: Sections [ ; OBJ: Section { @@ -167,7 +173,8 @@ ; OBJ-NEXT: PhysicalAddress: 0x0 ; OBJ-NEXT: VirtualAddress: 0x0 ; OBJ-NEXT: Size: 0x0 -; OBJ-NEXT: RawDataOffset: 0x8C +; OBJ32-NEXT: RawDataOffset: 0x8C +; OBJ64-NEXT: RawDataOffset: 0xF0 ; OBJ-NEXT: RelocationPointer: 0x0 ; OBJ-NEXT: LineNumberPointer: 0x0 ; OBJ-NEXT: NumberOfRelocations: 0 @@ -181,7 +188,8 @@ ; OBJ-NEXT: PhysicalAddress: 0x0 ; OBJ-NEXT: VirtualAddress: 0x0 ; OBJ-NEXT: Size: 0x80 -; OBJ-NEXT: RawDataOffset: 0x8C +; OBJ32-NEXT: RawDataOffset: 0x8C +; OBJ64-NEXT: RawDataOffset: 0xF0 ; OBJ-NEXT: RelocationPointer: 0x0 ; OBJ-NEXT: LineNumberPointer: 0x0 ; OBJ-NEXT: NumberOfRelocations: 0 @@ -204,41 +212,45 @@ ; OBJ-NEXT: } ; OBJ: ] -; SYMS: File: {{.*}}aix-xcoff-data.ll.tmp.o -; SYMS-NEXT: Format: aixcoff-rs6000 -; SYMS-NEXT: Arch: powerpc -; SYMS-NEXT: AddressSize: 32bit -; SYMS: Symbols [ -; SYMS-NEXT: Symbol { -; SYMS-NEXT: Index: 0 -; SYMS-NEXT: Name: .file -; SYMS-NEXT: Value (SymbolTableIndex): 0x0 -; SYMS-NEXT: Section: N_DEBUG -; SYMS-NEXT: Source Language ID: TB_C (0x0) -; SYMS-NEXT: CPU Version ID: 0x0 -; SYMS-NEXT: StorageClass: C_FILE (0x67) -; SYMS-NEXT: NumberOfAuxEntries: 0 -; SYMS-NEXT: } -; SYMS-NEXT: Symbol { -; SYMS-NEXT: Index: [[#INDX:]] -; SYMS-NEXT: Name: .text -; SYMS-NEXT: Value (RelocatableAddress): 0x0 -; SYMS-NEXT: Section: .text -; SYMS-NEXT: Type: 0x0 -; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) -; SYMS-NEXT: NumberOfAuxEntries: 1 -; SYMS-NEXT: CSECT Auxiliary Entry { -; SYMS-NEXT: Index: [[#INDX+1]] -; SYMS-NEXT: SectionLen: 0 -; SYMS-NEXT: ParameterHashIndex: 0x0 -; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 2 -; SYMS-NEXT: SymbolType: XTY_SD (0x1) -; SYMS-NEXT: StorageMappingClass: XMC_PR (0x0) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 -; SYMS-NEXT: } -; SYMS-NEXT: } +; SYMS: File: {{.*}}aix-xcoff-data.ll.tmp.o +; SYMS32-NEXT: Format: aixcoff-rs6000 +; SYMS32-NEXT: Arch: powerpc +; SYMS32-NEXT: AddressSize: 32bit +; SYMS64-NEXT: Format: aix5coff64-rs6000 +; SYMS64-NEXT: Arch: powerpc64 +; SYMS64-NEXT: AddressSize: 64bit +; SYMS: Symbols [ +; SYMS-NEXT: Symbol { +; SYMS-NEXT: Index: 0 +; SYMS-NEXT: Name: .file +; SYMS-NEXT: Value (SymbolTableIndex): 0x0 +; SYMS-NEXT: Section: N_DEBUG +; SYMS-NEXT: Source Language ID: TB_C (0x0) +; SYMS-NEXT: CPU Version ID: 0x0 +; SYMS-NEXT: StorageClass: C_FILE (0x67) +; SYMS-NEXT: NumberOfAuxEntries: 0 +; SYMS-NEXT: } +; SYMS-NEXT: Symbol { +; SYMS-NEXT: Index: [[#INDX:]] +; SYMS-NEXT: Name: .text +; SYMS-NEXT: Value (RelocatableAddress): 0x0 +; SYMS-NEXT: Section: .text +; SYMS-NEXT: Type: 0x0 +; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS-NEXT: NumberOfAuxEntries: 1 +; SYMS-NEXT: CSECT Auxiliary Entry { +; SYMS-NEXT: Index: [[#INDX+1]] +; SYMS-NEXT: SectionLen: 0 +; SYMS-NEXT: ParameterHashIndex: 0x0 +; SYMS-NEXT: TypeChkSectNum: 0x0 +; SYMS-NEXT: SymbolAlignmentLog2: 2 +; SYMS-NEXT: SymbolType: XTY_SD (0x1) +; SYMS-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS-NEXT: } +; SYMS-NEXT: } ; SYMS: Symbol { ; SYMS-NEXT: Index: [[#INDX+2]] @@ -256,8 +268,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 5 ; SYMS-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -277,8 +290,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -298,8 +312,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -319,8 +334,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -340,8 +356,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -361,8 +378,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -382,8 +400,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -403,8 +422,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -424,8 +444,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -445,8 +466,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -466,8 +488,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -487,8 +510,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -508,8 +532,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -529,8 +554,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -550,8 +576,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 2 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -571,8 +598,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 3 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -592,8 +620,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 1 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -613,8 +642,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 3 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -634,8 +664,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 2 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -655,8 +686,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 5 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -676,8 +708,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_CM (0x3) ; SYMS-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } ; SYMS: ] Index: llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll @@ -6,12 +6,12 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --symbols %t.o | \ -; RUN: FileCheck --check-prefix=XCOFF32 %s +; RUN: FileCheck --check-prefixes=XCOFF,XCOFF32 %s --match-full-lines -; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o 2>&1 < %s | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --symbols %t.o | \ +; RUN: FileCheck --check-prefixes=XCOFF,XCOFF64 %s --match-full-lines @La = external global i32, align 4 @@ -24,41 +24,43 @@ ret void } -; XCOFF32: Index: [[#IND:]]{{.*}}{{[[:space:]] *}}Name: .Lb -; XCOFF32-NEXT: Value (RelocatableAddress): 0x0 -; XCOFF32-NEXT: Section: N_UNDEF -; XCOFF32-NEXT: Type: 0x0 -; XCOFF32-NEXT: StorageClass: C_EXT (0x2) -; XCOFF32-NEXT: NumberOfAuxEntries: 1 -; XCOFF32-NEXT: CSECT Auxiliary Entry { -; XCOFF32-NEXT: Index: [[#IND+1]] -; XCOFF32-NEXT: SectionLen: 0 -; XCOFF32-NEXT: ParameterHashIndex: 0x0 -; XCOFF32-NEXT: TypeChkSectNum: 0x0 -; XCOFF32-NEXT: SymbolAlignmentLog2: 0 -; XCOFF32-NEXT: SymbolType: XTY_ER (0x0) -; XCOFF32-NEXT: StorageMappingClass: XMC_PR (0x0) -; XCOFF32-NEXT: StabInfoIndex: 0x0 -; XCOFF32-NEXT: StabSectNum: 0x0 -; XCOFF32-NEXT: } -; XCOFF32-NEXT: } -; XCOFF32-NEXT: Symbol { -; XCOFF32-NEXT: Index: [[#IND+2]] -; XCOFF32-NEXT: Name: La -; XCOFF32-NEXT: Value (RelocatableAddress): 0x0 -; XCOFF32-NEXT: Section: N_UNDEF -; XCOFF32-NEXT: Type: 0x0 -; XCOFF32-NEXT: StorageClass: C_EXT (0x2) -; XCOFF32-NEXT: NumberOfAuxEntries: 1 -; XCOFF32-NEXT: CSECT Auxiliary Entry { -; XCOFF32-NEXT: Index: [[#IND+3]] -; XCOFF32-NEXT: SectionLen: 0 -; XCOFF32-NEXT: ParameterHashIndex: 0x0 -; XCOFF32-NEXT: TypeChkSectNum: 0x0 -; XCOFF32-NEXT: SymbolAlignmentLog2: 0 -; XCOFF32-NEXT: SymbolType: XTY_ER (0x0) -; XCOFF32-NEXT: StorageMappingClass: XMC_UA (0x4) -; XCOFF32-NEXT: StabInfoIndex: 0x0 -; XCOFF32-NEXT: StabSectNum: 0x0 -; XCOFF32-NEXT: } -; XCOFF32-NEXT: } +; XCOFF: Index: [[#IND:]]{{.*}}{{[[:space:]] *}}Name: .Lb +; XCOFF-NEXT: Value (RelocatableAddress): 0x0 +; XCOFF-NEXT: Section: N_UNDEF +; XCOFF-NEXT: Type: 0x0 +; XCOFF-NEXT: StorageClass: C_EXT (0x2) +; XCOFF-NEXT: NumberOfAuxEntries: 1 +; XCOFF-NEXT: CSECT Auxiliary Entry { +; XCOFF-NEXT: Index: [[#IND+1]] +; XCOFF-NEXT: SectionLen: 0 +; XCOFF-NEXT: ParameterHashIndex: 0x0 +; XCOFF-NEXT: TypeChkSectNum: 0x0 +; XCOFF-NEXT: SymbolAlignmentLog2: 0 +; XCOFF-NEXT: SymbolType: XTY_ER (0x0) +; XCOFF-NEXT: StorageMappingClass: XMC_PR (0x0) +; XCOFF32-NEXT: StabInfoIndex: 0x0 +; XCOFF32-NEXT: StabSectNum: 0x0 +; XCOFF64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; XCOFF-NEXT: } +; XCOFF-NEXT: } +; XCOFF-NEXT: Symbol { +; XCOFF-NEXT: Index: [[#IND+2]] +; XCOFF-NEXT: Name: La +; XCOFF-NEXT: Value (RelocatableAddress): 0x0 +; XCOFF-NEXT: Section: N_UNDEF +; XCOFF-NEXT: Type: 0x0 +; XCOFF-NEXT: StorageClass: C_EXT (0x2) +; XCOFF-NEXT: NumberOfAuxEntries: 1 +; XCOFF-NEXT: CSECT Auxiliary Entry { +; XCOFF-NEXT: Index: [[#IND+3]] +; XCOFF-NEXT: SectionLen: 0 +; XCOFF-NEXT: ParameterHashIndex: 0x0 +; XCOFF-NEXT: TypeChkSectNum: 0x0 +; XCOFF-NEXT: SymbolAlignmentLog2: 0 +; XCOFF-NEXT: SymbolType: XTY_ER (0x0) +; XCOFF-NEXT: StorageMappingClass: XMC_UA (0x4) +; XCOFF32-NEXT: StabInfoIndex: 0x0 +; XCOFF32-NEXT: StabSectNum: 0x0 +; XCOFF64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; XCOFF-NEXT: } +; XCOFF-NEXT: } Index: llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll @@ -18,32 +18,53 @@ ; RUN: sed >%t.ll 's/SIZE/65534/;s/MACRO/#/;s/#/################/g;s/#/################/g;s/#/################/g;s/#/################/g;s/#/#_/g;s/_#_#_\([^#]\)/\1/;s/_/, /g;s/#/i8* @c/g;' ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ ; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.ll -; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=XCOFF32 %s +; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefixes=XCOFF,XCOFF32 %s --match-full-lines + +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.overflow.ll +; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=XCOFF64_OVERF %s --match-full-lines + +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.ll +; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=XCOFF,XCOFF64 %s --match-full-lines -; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.overflow.ll 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.ll 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. @c = external global i8, align 1 @arr = global [SIZE x i8*] [MACRO], align 8 -; XCOFF32-NOT: Name: .ovrflo -; XCOFF32-NOT: Type: STYP_OVRFLO -; XCOFF32: Section { -; XCOFF32: Name: .data -; XCOFF32-NEXT: PhysicalAddress: 0x0 -; XCOFF32-NEXT: VirtualAddress: 0x0 -; XCOFF32-NEXT: Size: 0x3FFF8 -; XCOFF32-NEXT: RawDataOffset: 0x64 -; XCOFF32-NEXT: RelocationPointer: 0x4005C -; XCOFF32-NEXT: LineNumberPointer: 0x0 -; XCOFF32-NEXT: NumberOfRelocations: 65534 -; XCOFF32-NEXT: NumberOfLineNumbers: 0 -; XCOFF32-NEXT: Type: STYP_DATA (0x40) -; XCOFF32-NEXT: } -; XCOFF32-NOT: Name: .ovrflo -; XCOFF32-NOT: Type: STYP_OVRFLO +; XCOFF-NOT: Name: .ovrflo +; XCOFF-NOT: Type: STYP_OVRFLO +; XCOFF: Section { +; XCOFF: Name: .data +; XCOFF-NEXT: PhysicalAddress: 0x0 +; XCOFF-NEXT: VirtualAddress: 0x0 +; XCOFF32-NEXT: Size: 0x3FFF8 +; XCOFF32-NEXT: RawDataOffset: 0x64 +; XCOFF32-NEXT: RelocationPointer: 0x4005C +; XCOFF64-NEXT: Size: 0x7FFF0 +; XCOFF64-NEXT: RawDataOffset: 0xA8 +; XCOFF64-NEXT: RelocationPointer: 0x80098 +; XCOFF-NEXT: LineNumberPointer: 0x0 +; XCOFF-NEXT: NumberOfRelocations: 65534 +; XCOFF-NEXT: NumberOfLineNumbers: 0 +; XCOFF-NEXT: Type: STYP_DATA (0x40) +; XCOFF-NEXT: } +; XCOFF-NOT: Name: .ovrflo +; XCOFF-NOT: Type: STYP_OVRFLO + +; XCOFF64_OVERF-NOT: Name: .ovrflo +; XCOFF64_OVERF-NOT: Type: STYP_OVRFLO +; XCOFF64_OVERF: Section { +; XCOFF64_OVERF: Name: .data +; XCOFF64_OVERF-NEXT: PhysicalAddress: 0x0 +; XCOFF64_OVERF-NEXT: VirtualAddress: 0x0 +; XCOFF64_OVERF-NEXT: Size: 0x7FFF8 +; XCOFF64_OVERF-NEXT: RawDataOffset: 0xA8 +; XCOFF64_OVERF-NEXT: RelocationPointer: 0x800A0 +; XCOFF64_OVERF-NEXT: LineNumberPointer: 0x0 +; XCOFF64_OVERF-NEXT: NumberOfRelocations: 65535 +; XCOFF64_OVERF-NEXT: NumberOfLineNumbers: 0 +; XCOFF64_OVERF-NEXT: Type: STYP_DATA (0x40) +; XCOFF64_OVERF-NEXT: } +; XCOFF64_OVERF-NOT: Name: .ovrflo +; XCOFF64_OVERF-NOT: Type: STYP_OVRFLO Index: llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll @@ -3,12 +3,13 @@ ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --section-headers --file-header %t.o | \ -; RUN: FileCheck --check-prefix=OBJ %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s +; RUN: FileCheck --check-prefixes=OBJ,OBJ32 %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32 %s --match-full-lines -; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=OBJ64 %s -; OBJ64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --section-headers --file-header %t.o | \ +; RUN: FileCheck --check-prefixes=OBJ,OBJ64 %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS64 %s --match-full-lines @a = internal global i32 0, align 4 @b = internal global i64 0, align 8 @@ -18,95 +19,106 @@ ; CHECK-NEXT: .lcomm b,8,b[BS],3 ; CHECK-NEXT: .lcomm c,2,c[BS],1 -; OBJ: File: {{.*}}aix-xcoff-lcomm.ll.tmp.o -; OBJ-NEXT: Format: aixcoff-rs6000 -; OBJ-NEXT: Arch: powerpc -; OBJ-NEXT: AddressSize: 32bit -; OBJ-NEXT: FileHeader { -; OBJ-NEXT: Magic: 0x1DF -; OBJ-NEXT: NumberOfSections: 2 -; OBJ-NEXT: TimeStamp: -; OBJ-NEXT: SymbolTableOffset: 0x64 -; OBJ-NEXT: SymbolTableEntries: 9 -; OBJ-NEXT: OptionalHeaderSize: 0x0 -; OBJ-NEXT: Flags: 0x0 -; OBJ-NEXT: } -; OBJ-NEXT: Sections [ -; OBJ: Section {{[{][[:space:]] *}}Index: 2 -; OBJ-NEXT: Name: .bss -; OBJ-NEXT: PhysicalAddress: 0x0 -; OBJ-NEXT: VirtualAddress: 0x0 -; OBJ-NEXT: Size: 0x14 -; OBJ-NEXT: RawDataOffset: 0x0 -; OBJ-NEXT: RelocationPointer: 0x0 -; OBJ-NEXT: LineNumberPointer: 0x0 -; OBJ-NEXT: NumberOfRelocations: 0 -; OBJ-NEXT: NumberOfLineNumbers: 0 -; OBJ-NEXT: Type: STYP_BSS (0x80) +; OBJ: File: {{.*}}aix-xcoff-lcomm.ll.tmp.o +; OBJ32-NEXT: Format: aixcoff-rs6000 +; OBJ32-NEXT: Arch: powerpc +; OBJ32-NEXT: AddressSize: 32bit +; OBJ64-NEXT: Format: aix5coff64-rs6000 +; OBJ64-NEXT: Arch: powerpc64 +; OBJ64-NEXT: AddressSize: 64bit +; OBJ-NEXT: FileHeader { +; OBJ32-NEXT: Magic: 0x1DF +; OBJ64-NEXT: Magic: 0x1F7 +; OBJ-NEXT: NumberOfSections: 2 +; OBJ-NEXT: TimeStamp: +; OBJ32-NEXT: SymbolTableOffset: 0x64 +; OBJ64-NEXT: SymbolTableOffset: 0xA8 +; OBJ-NEXT: SymbolTableEntries: 9 +; OBJ-NEXT: OptionalHeaderSize: 0x0 +; OBJ-NEXT: Flags: 0x0 ; OBJ-NEXT: } -; OBJ-NEXT: ] +; OBJ-NEXT: Sections [ +; OBJ: Section {{[{][[:space:]] *}}Index: 2 +; OBJ-NEXT: Name: .bss +; OBJ-NEXT: PhysicalAddress: 0x0 +; OBJ-NEXT: VirtualAddress: 0x0 +; OBJ-NEXT: Size: 0x14 +; OBJ-NEXT: RawDataOffset: 0x0 +; OBJ-NEXT: RelocationPointer: 0x0 +; OBJ-NEXT: LineNumberPointer: 0x0 +; OBJ-NEXT: NumberOfRelocations: 0 +; OBJ-NEXT: NumberOfLineNumbers: 0 +; OBJ-NEXT: Type: STYP_BSS (0x80) +; OBJ-NEXT: } +; OBJ-NEXT: ] -; SYMS: File: {{.*}}aix-xcoff-lcomm.ll.tmp.o -; SYMS-NEXT: Format: aixcoff-rs6000 -; SYMS-NEXT: Arch: powerpc -; SYMS-NEXT: AddressSize: 32bit -; SYMS-NEXT: Symbols [ -; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#Index:]]{{[[:space:]] *}}Name: a -; SYMS-NEXT: Value (RelocatableAddress): 0x0 -; SYMS-NEXT: Section: .bss -; SYMS-NEXT: Type: 0x0 -; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) -; SYMS-NEXT: NumberOfAuxEntries: 1 -; SYMS-NEXT: CSECT Auxiliary Entry { -; SYMS-NEXT: Index: [[#Index + 1]] -; SYMS-NEXT: SectionLen: 4 -; SYMS-NEXT: ParameterHashIndex: 0x0 -; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 2 -; SYMS-NEXT: SymbolType: XTY_CM (0x3) -; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS: File: {{.*}}aix-xcoff-lcomm.ll.tmp.o +; SYMS32-NEXT: Format: aixcoff-rs6000 +; SYMS32-NEXT: Arch: powerpc +; SYMS32-NEXT: AddressSize: 32bit +; SYMS64-NEXT: Format: aix5coff64-rs6000 +; SYMS64-NEXT: Arch: powerpc64 +; SYMS64-NEXT: AddressSize: 64bit +; SYMS-NEXT: Symbols [ +; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#Index:]]{{[[:space:]] *}}Name: a +; SYMS-NEXT: Value (RelocatableAddress): 0x0 +; SYMS-NEXT: Section: .bss +; SYMS-NEXT: Type: 0x0 +; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS-NEXT: NumberOfAuxEntries: 1 +; SYMS-NEXT: CSECT Auxiliary Entry { +; SYMS-NEXT: Index: [[#Index + 1]] +; SYMS-NEXT: SectionLen: 4 +; SYMS-NEXT: ParameterHashIndex: 0x0 +; SYMS-NEXT: TypeChkSectNum: 0x0 +; SYMS-NEXT: SymbolAlignmentLog2: 2 +; SYMS-NEXT: SymbolType: XTY_CM (0x3) +; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9) +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS-NEXT: } ; SYMS-NEXT: } -; SYMS-NEXT: } -; SYMS-NEXT: Symbol { -; SYMS-NEXT: Index: [[#Index + 2]] -; SYMS-NEXT: Name: b -; SYMS-NEXT: Value (RelocatableAddress): 0x8 -; SYMS-NEXT: Section: .bss -; SYMS-NEXT: Type: 0x0 -; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) -; SYMS-NEXT: NumberOfAuxEntries: 1 -; SYMS-NEXT: CSECT Auxiliary Entry { -; SYMS-NEXT: Index: [[#Index + 3]] -; SYMS-NEXT: SectionLen: 8 -; SYMS-NEXT: ParameterHashIndex: 0x0 -; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 3 -; SYMS-NEXT: SymbolType: XTY_CM (0x3) -; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS-NEXT: Symbol { +; SYMS-NEXT: Index: [[#Index + 2]] +; SYMS-NEXT: Name: b +; SYMS-NEXT: Value (RelocatableAddress): 0x8 +; SYMS-NEXT: Section: .bss +; SYMS-NEXT: Type: 0x0 +; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS-NEXT: NumberOfAuxEntries: 1 +; SYMS-NEXT: CSECT Auxiliary Entry { +; SYMS-NEXT: Index: [[#Index + 3]] +; SYMS-NEXT: SectionLen: 8 +; SYMS-NEXT: ParameterHashIndex: 0x0 +; SYMS-NEXT: TypeChkSectNum: 0x0 +; SYMS-NEXT: SymbolAlignmentLog2: 3 +; SYMS-NEXT: SymbolType: XTY_CM (0x3) +; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9) +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS-NEXT: } ; SYMS-NEXT: } -; SYMS-NEXT: } -; SYMS-NEXT: Symbol { -; SYMS-NEXT: Index: [[#Index + 4]] -; SYMS-NEXT: Name: c -; SYMS-NEXT: Value (RelocatableAddress): 0x10 -; SYMS-NEXT: Section: .bss -; SYMS-NEXT: Type: 0x0 -; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) -; SYMS-NEXT: NumberOfAuxEntries: 1 -; SYMS-NEXT: CSECT Auxiliary Entry { -; SYMS-NEXT: Index: [[#Index + 5]] -; SYMS-NEXT: SectionLen: 2 -; SYMS-NEXT: ParameterHashIndex: 0x0 -; SYMS-NEXT: TypeChkSectNum: 0x0 -; SYMS-NEXT: SymbolAlignmentLog2: 1 -; SYMS-NEXT: SymbolType: XTY_CM (0x3) -; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS-NEXT: Symbol { +; SYMS-NEXT: Index: [[#Index + 4]] +; SYMS-NEXT: Name: c +; SYMS-NEXT: Value (RelocatableAddress): 0x10 +; SYMS-NEXT: Section: .bss +; SYMS-NEXT: Type: 0x0 +; SYMS-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS-NEXT: NumberOfAuxEntries: 1 +; SYMS-NEXT: CSECT Auxiliary Entry { +; SYMS-NEXT: Index: [[#Index + 5]] +; SYMS-NEXT: SectionLen: 2 +; SYMS-NEXT: ParameterHashIndex: 0x0 +; SYMS-NEXT: TypeChkSectNum: 0x0 +; SYMS-NEXT: SymbolAlignmentLog2: 1 +; SYMS-NEXT: SymbolType: XTY_CM (0x3) +; SYMS-NEXT: StorageMappingClass: XMC_BS (0x9) +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS-NEXT: } ; SYMS-NEXT: } -; SYMS-NEXT: } -; SYMS-NEXT: ] +; SYMS-NEXT: ] Index: llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll @@ -6,10 +6,9 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj -r --expand-relocs --syms %t.o | FileCheck --check-prefixes=RELOC,SYM %s -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -data-sections=false -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -data-sections=false -filetype=obj -o %t.o < %s +// UNSUPPORTED: powerpc64 @common = common global i32 0, align 4 @pointer = global i32* @common, align 4 Index: llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll @@ -1,15 +1,20 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -mattr=-altivec \ ; RUN: -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --section-headers --file-header %t.o | \ -; RUN: FileCheck --check-prefix=OBJ %s +; RUN: FileCheck --check-prefixes=OBJ,OBJ32 %s ; RUN: llvm-readobj --relocs --expand-relocs %t.o | FileCheck --check-prefix=RELOC %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYM %s -; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYM,SYM32 %s --match-full-lines +; RUN: llvm-objdump -D %t.o | FileCheck --check-prefixes=DIS,DIS32 %s ; RUN: llvm-objdump -r %t.o | FileCheck --check-prefix=DIS_REL %s -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -mattr=-altivec -data-sections=false -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -mattr=-altivec \ +; RUN: -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --section-headers --file-header %t.o | \ +; RUN: FileCheck --check-prefixes=OBJ,OBJ64 %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYM,SYM64 %s --match-full-lines +; RUN: llvm-objdump -D %t.o | FileCheck --check-prefixes=DIS,DIS64 %s +; RUN: not --crash llvm-objdump -r %t.o 2>&1 | FileCheck --check-prefix=XCOFF64 %s +; XCOFF64: LLVM ERROR: 64-bit support not implemented yet @globalA = global i32 1, align 4 @globalB = global i32 2, align 4 @@ -28,47 +33,57 @@ declare i32 @bar(i32) -; OBJ: File: {{.*}}aix-xcoff-reloc.ll.tmp.o -; OBJ-NEXT: Format: aixcoff-rs6000 -; OBJ-NEXT: Arch: powerpc -; OBJ-NEXT: AddressSize: 32bit -; OBJ-NEXT: FileHeader { -; OBJ-NEXT: Magic: 0x1DF -; OBJ-NEXT: NumberOfSections: 2 -; OBJ-NEXT: TimeStamp: None (0x0) -; OBJ-NEXT: SymbolTableOffset: 0x13C -; OBJ-NEXT: SymbolTableEntries: 27 -; OBJ-NEXT: OptionalHeaderSize: 0x0 -; OBJ-NEXT: Flags: 0x0 -; OBJ-NEXT: } -; OBJ-NEXT: Sections [ -; OBJ-NEXT: Section { -; OBJ-NEXT: Index: 1 -; OBJ-NEXT: Name: .text -; OBJ-NEXT: PhysicalAddress: 0x0 -; OBJ-NEXT: VirtualAddress: 0x0 -; OBJ-NEXT: Size: 0x40 -; OBJ-NEXT: RawDataOffset: 0x64 -; OBJ-NEXT: RelocationPointer: 0xEC -; OBJ-NEXT: LineNumberPointer: 0x0 -; OBJ-NEXT: NumberOfRelocations: 3 -; OBJ-NEXT: NumberOfLineNumbers: 0 -; OBJ-NEXT: Type: STYP_TEXT (0x20) -; OBJ-NEXT: } -; OBJ-NEXT: Section { -; OBJ-NEXT: Index: 2 -; OBJ-NEXT: Name: .data -; OBJ-NEXT: PhysicalAddress: 0x40 -; OBJ-NEXT: VirtualAddress: 0x40 -; OBJ-NEXT: Size: 0x48 -; OBJ-NEXT: RawDataOffset: 0xA4 -; OBJ-NEXT: RelocationPointer: 0x10A -; OBJ-NEXT: LineNumberPointer: 0x0 -; OBJ-NEXT: NumberOfRelocations: 5 -; OBJ-NEXT: NumberOfLineNumbers: 0 -; OBJ-NEXT: Type: STYP_DATA (0x40) +; OBJ: File: {{.*}}aix-xcoff-reloc.ll.tmp.o +; OBJ32-NEXT: Format: aixcoff-rs6000 +; OBJ32-NEXT: Arch: powerpc +; OBJ32-NEXT: AddressSize: 32bit +; OBJ64-NEXT: Format: aix5coff64-rs6000 +; OBJ64-NEXT: Arch: powerpc64 +; OBJ64-NEXT: AddressSize: 64bit +; OBJ-NEXT: FileHeader { +; OBJ32-NEXT: Magic: 0x1DF +; OBJ64-NEXT: Magic: 0x1F7 +; OBJ-NEXT: NumberOfSections: 2 +; OBJ-NEXT: TimeStamp: None (0x0) +; OBJ32-NEXT: SymbolTableOffset: 0x13C +; OBJ64-NEXT: SymbolTableOffset: 0x1B8 +; OBJ-NEXT: SymbolTableEntries: 27 +; OBJ-NEXT: OptionalHeaderSize: 0x0 +; OBJ-NEXT: Flags: 0x0 ; OBJ-NEXT: } -; OBJ-NEXT: ] +; OBJ-NEXT: Sections [ +; OBJ-NEXT: Section { +; OBJ-NEXT: Index: 1 +; OBJ-NEXT: Name: .text +; OBJ-NEXT: PhysicalAddress: 0x0 +; OBJ-NEXT: VirtualAddress: 0x0 +; OBJ-NEXT: Size: 0x40 +; OBJ32-NEXT: RawDataOffset: 0x64 +; OBJ32-NEXT: RelocationPointer: 0xEC +; OBJ64-NEXT: RawDataOffset: 0xA8 +; OBJ64-NEXT: RelocationPointer: 0x148 +; OBJ-NEXT: LineNumberPointer: 0x0 +; OBJ-NEXT: NumberOfRelocations: 3 +; OBJ-NEXT: NumberOfLineNumbers: 0 +; OBJ-NEXT: Type: STYP_TEXT (0x20) +; OBJ-NEXT: } +; OBJ-NEXT: Section { +; OBJ-NEXT: Index: 2 +; OBJ-NEXT: Name: .data +; OBJ-NEXT: PhysicalAddress: 0x40 +; OBJ-NEXT: VirtualAddress: 0x40 +; OBJ32-NEXT: Size: 0x48 +; OBJ32-NEXT: RawDataOffset: 0xA4 +; OBJ32-NEXT: RelocationPointer: 0x10A +; OBJ64-NEXT: Size: 0x60 +; OBJ64-NEXT: RawDataOffset: 0xE8 +; OBJ64-NEXT: RelocationPointer: 0x172 +; OBJ-NEXT: LineNumberPointer: 0x0 +; OBJ-NEXT: NumberOfRelocations: 5 +; OBJ-NEXT: NumberOfLineNumbers: 0 +; OBJ-NEXT: Type: STYP_DATA (0x40) +; OBJ-NEXT: } +; OBJ-NEXT: ] ; RELOC: File: {{.*}}aix-xcoff-reloc.ll.tmp.o @@ -173,8 +188,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_ER (0x0) ; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -193,8 +209,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_ER (0x0) ; SYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -213,8 +230,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 4 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -233,8 +251,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_LD (0x2) ; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -247,14 +266,17 @@ ; SYM-NEXT: NumberOfAuxEntries: 1 ; SYM-NEXT: CSECT Auxiliary Entry { ; SYM-NEXT: Index: [[#INDX+9]] -; SYM-NEXT: SectionLen: 52 +; SYM32-NEXT: SectionLen: 52 +; SYM64-NEXT: SectionLen: 56 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -273,8 +295,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_LD (0x2) ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -293,8 +316,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_LD (0x2) ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -313,8 +337,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_LD (0x2) ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -333,34 +358,40 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_LD (0x2) ; SYM-NEXT: StorageMappingClass: XMC_RW (0x5) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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+18]] ; SYM-NEXT: Name: foo -; SYM-NEXT: Value (RelocatableAddress): 0x74 +; SYM32-NEXT: Value (RelocatableAddress): 0x74 +; SYM64-NEXT: Value (RelocatableAddress): 0x78 ; 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+19]] -; SYM-NEXT: SectionLen: 12 +; SYM32-NEXT: SectionLen: 12 +; SYM64-NEXT: SectionLen: 24 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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+20]] ; SYM-NEXT: Name: TOC -; SYM-NEXT: Value (RelocatableAddress): 0x80 +; SYM32-NEXT: Value (RelocatableAddress): 0x80 +; SYM64-NEXT: Value (RelocatableAddress): 0x90 ; SYM-NEXT: Section: .data ; SYM-NEXT: Type: 0x0 ; SYM-NEXT: StorageClass: C_HIDEXT (0x6B) @@ -373,70 +404,86 @@ ; SYM-NEXT: SymbolAlignmentLog2: 2 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC0 (0xF) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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+22]] ; SYM-NEXT: Name: globalA -; SYM-NEXT: Value (RelocatableAddress): 0x80 +; SYM32-NEXT: Value (RelocatableAddress): 0x80 +; SYM64-NEXT: Value (RelocatableAddress): 0x90 ; 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+23]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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+24]] ; SYM-NEXT: Name: globalB -; SYM-NEXT: Value (RelocatableAddress): 0x84 +; SYM32-NEXT: Value (RelocatableAddress): 0x84 +; SYM64-NEXT: Value (RelocatableAddress): 0x98 ; 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+25]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: ] -; DIS: {{.*}}aix-xcoff-reloc.ll.tmp.o: file format aixcoff-rs6000 +; DIS32: {{.*}}aix-xcoff-reloc.ll.tmp.o: file format aixcoff-rs6000 +; DIS64: {{.*}}aix-xcoff-reloc.ll.tmp.o: file format aix5coff64-rs6000 ; DIS: Disassembly of section .text: ; DIS: 00000000 <.text>: ; DIS-NEXT: 0: 7c 08 02 a6 mflr 0 -; DIS-NEXT: 4: 90 01 00 08 stw 0, 8(1) -; DIS-NEXT: 8: 94 21 ff c0 stwu 1, -64(1) +; DIS32-NEXT: 4: 90 01 00 08 stw 0, 8(1) +; DIS32-NEXT: 8: 94 21 ff c0 stwu 1, -64(1) +; DIS64-NEXT: 4: f8 01 00 10 std 0, 16(1) +; DIS64-NEXT: 8: f8 21 ff 91 stdu 1, -112(1) ; DIS-NEXT: c: 38 60 00 01 li 3, 1 ; DIS-NEXT: 10: 4b ff ff f1 bl 0x0 ; DIS-NEXT: 14: 60 00 00 00 nop -; DIS-NEXT: 18: 80 82 00 00 lwz 4, 0(2) -; DIS-NEXT: 1c: 80 a2 00 04 lwz 5, 4(2) +; DIS32-NEXT: 18: 80 82 00 00 lwz 4, 0(2) +; DIS32-NEXT: 1c: 80 a2 00 04 lwz 5, 4(2) +; DIS64-NEXT: 18: e8 82 00 00 ld 4, 0(2) +; DIS64-NEXT: 1c: e8 a2 00 08 ld 5, 8(2) ; DIS-NEXT: 20: 80 84 00 00 lwz 4, 0(4) ; DIS-NEXT: 24: 80 a5 00 00 lwz 5, 0(5) ; DIS-NEXT: 28: 7c 63 22 14 add 3, 3, 4 ; DIS-NEXT: 2c: 7c 63 2a 14 add 3, 3, 5 -; DIS-NEXT: 30: 38 21 00 40 addi 1, 1, 64 -; DIS-NEXT: 34: 80 01 00 08 lwz 0, 8(1) +; DIS32-NEXT: 30: 38 21 00 40 addi 1, 1, 64 +; DIS32-NEXT: 34: 80 01 00 08 lwz 0, 8(1) +; DIS64-NEXT: 30: 38 21 00 70 addi 1, 1, 112 +; DIS64-NEXT: 34: e8 01 00 10 ld 0, 16(1) ; DIS-NEXT: 38: 7c 08 03 a6 mtlr 0 ; DIS-NEXT: 3c: 4e 80 00 20 blr @@ -448,16 +495,30 @@ ; DIS: 00000048 : ; DIS-NEXT: 48: 00 00 00 03 ; DIS-NEXT: ... -; DIS: 00000070

: -; DIS-NEXT: 70: 00 00 00 58 -; DIS: 00000074 : -; DIS-NEXT: 74: 00 00 00 00 -; DIS-NEXT: 78: 00 00 00 80 -; DIS-NEXT: 7c: 00 00 00 00 -; DIS: 00000080 : -; DIS-NEXT: 80: 00 00 00 40 -; DIS: 00000084 : -; DIS-NEXT: 84: 00 00 00 44 + +; DIS32: 00000070

: +; DIS32-NEXT: 70: 00 00 00 58 +; DIS32: 00000074 : +; DIS32-NEXT: 74: 00 00 00 00 +; DIS32-NEXT: 78: 00 00 00 80 +; DIS32-NEXT: 7c: 00 00 00 00 +; DIS32: 00000080 : +; DIS32-NEXT: 80: 00 00 00 40 +; DIS32: 00000084 : +; DIS32-NEXT: 84: 00 00 00 44 + +; DIS64: 00000070

: +; DIS64-NEXT: 70: 00 00 00 00 +; DIS64-NEXT: 74: 00 00 00 58 +; DIS64: 00000078 : +; DIS64-NEXT: ... +; DIS64-NEXT: 84: 00 00 00 90 +; DIS64: 00000090 : +; DIS64-NEXT: 90: 00 00 00 00 +; DIS64-NEXT: 94: 00 00 00 40 +; DIS64: 00000098 : +; DIS64-NEXT: 98: 00 00 00 00 +; DIS64-NEXT: 9c: 00 00 00 44 ; DIS_REL: {{.*}}aix-xcoff-reloc.ll.tmp.o: file format aixcoff-rs6000 ; DIS_REL: RELOCATION RECORDS FOR [.text]: Index: llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll @@ -5,13 +5,15 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --section-headers --file-header %t.o | \ -; RUN: FileCheck --check-prefix=OBJ %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s +; RUN: FileCheck --check-prefixes=OBJ,OBJ32 %s --match-full-lines +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32 %s --match-full-lines ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %s -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -filetype=obj < %s 2>&1 | \ -; RUN: FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --section-headers --file-header %t.o | \ +; RUN: FileCheck --check-prefixes=OBJ,OBJ64 %s --match-full-lines +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS64 %s --match-full-lines +; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %s @const_ivar = constant i32 35, align 4 @const_llvar = constant i64 36, align 8 @@ -73,19 +75,24 @@ ; CHECK64-NEXT: .vbyte 8, 0x4010000000000000 -; OBJ: File: {{.*}}aix-xcoff-rodata.ll.tmp.o -; OBJ-NEXT: Format: aixcoff-rs6000 -; OBJ-NEXT: Arch: powerpc -; OBJ-NEXT: AddressSize: 32bit -; OBJ-NEXT: FileHeader { -; OBJ-NEXT: Magic: 0x1DF -; OBJ-NEXT: NumberOfSections: 1 -; OBJ-NEXT: TimeStamp: None (0x0) -; OBJ-NEXT: SymbolTableOffset: 0x8C -; OBJ-NEXT: SymbolTableEntries: 21 -; OBJ-NEXT: OptionalHeaderSize: 0x0 -; OBJ-NEXT: Flags: 0x0 -; OBJ-NEXT: } +; OBJ: File: {{.*}}aix-xcoff-rodata.ll.tmp.o +; OBJ32-NEXT: Format: aixcoff-rs6000 +; OBJ32-NEXT: Arch: powerpc +; OBJ32-NEXT: AddressSize: 32bit +; OBJ64-NEXT: Format: aix5coff64-rs6000 +; OBJ64-NEXT: Arch: powerpc64 +; OBJ64-NEXT: AddressSize: 64bit +; OBJ-NEXT: FileHeader { +; OBJ32-NEXT: Magic: 0x1DF +; OBJ64-NEXT: Magic: 0x1F7 +; OBJ-NEXT: NumberOfSections: 1 +; OBJ-NEXT: TimeStamp: None (0x0) +; OBJ32-NEXT: SymbolTableOffset: 0x8C +; OBJ64-NEXT: SymbolTableOffset: 0xB0 +; OBJ-NEXT: SymbolTableEntries: 21 +; OBJ-NEXT: OptionalHeaderSize: 0x0 +; OBJ-NEXT: Flags: 0x0 +; OBJ-NEXT: } ; OBJ: Sections [ ; OBJ: Section { @@ -94,7 +101,8 @@ ; OBJ-NEXT: PhysicalAddress: 0x0 ; OBJ-NEXT: VirtualAddress: 0x0 ; OBJ-NEXT: Size: 0x50 -; OBJ-NEXT: RawDataOffset: 0x3C +; OBJ32-NEXT: RawDataOffset: 0x3C +; OBJ64-NEXT: RawDataOffset: 0x60 ; OBJ-NEXT: RelocationPointer: 0x0 ; OBJ-NEXT: LineNumberPointer: 0x0 ; OBJ-NEXT: NumberOfRelocations: 0 @@ -104,12 +112,15 @@ ; OBJ-NEXT: ] -; SYMS: File: {{.*}}aix-xcoff-rodata.ll.tmp.o -; SYMS-NEXT: Format: aixcoff-rs6000 -; SYMS-NEXT: Arch: powerpc -; SYMS-NEXT: AddressSize: 32bit -; SYMS: Symbols [ -; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .rodata +; SYMS: File: {{.*}}aix-xcoff-rodata.ll.tmp.o +; SYMS32-NEXT: Format: aixcoff-rs6000 +; SYMS32-NEXT: Arch: powerpc +; SYMS32-NEXT: AddressSize: 32bit +; SYMS64-NEXT: Format: aix5coff64-rs6000 +; SYMS64-NEXT: Arch: powerpc64 +; SYMS64-NEXT: AddressSize: 64bit +; SYMS: Symbols [ +; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .rodata ; SYMS-NEXT: Value (RelocatableAddress): 0x0 ; SYMS-NEXT: Section: .text ; SYMS-NEXT: Type: 0x0 @@ -123,8 +134,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 5 ; SYMS-NEXT: SymbolType: XTY_SD (0x1) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -144,8 +156,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -165,8 +178,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -186,8 +200,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -207,8 +222,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -228,8 +244,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -249,8 +266,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -270,8 +288,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } @@ -291,8 +310,9 @@ ; SYMS-NEXT: SymbolAlignmentLog2: 0 ; SYMS-NEXT: SymbolType: XTY_LD (0x2) ; SYMS-NEXT: StorageMappingClass: XMC_RO (0x1) -; SYMS-NEXT: StabInfoIndex: 0x0 -; SYMS-NEXT: StabSectNum: 0x0 +; SYMS32-NEXT: StabInfoIndex: 0x0 +; SYMS32-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYMS-NEXT: } ; SYMS-NEXT: } ; SYMS: ] Index: llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll @@ -3,15 +3,15 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \ ; RUN: -xcoff-traceback-table=false < %s | FileCheck --check-prefixes CHECK,CHECK32 %s ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -xcoff-traceback-table=false < %s 2>&1 | FileCheck --check-prefixes CHECK,CHECK64 %s +; RUN: -xcoff-traceback-table=false < %s | FileCheck --check-prefixes CHECK,CHECK64 %s ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \ ; RUN: --xcoff-traceback-table=false -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYM %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes SYM,SYM32 %s --match-full-lines -; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff -filetype=obj -o %t.o 2>&1 \ -; RUN: < %s | FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: --xcoff-traceback-table=false -filetype=obj -o %t.o < %s +; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes SYM,SYM64 %s --match-full-lines @a = external global i32, align 4 @b = external global i64, align 8 @@ -94,8 +94,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_ER (0x0) ; SYM-NEXT: StorageMappingClass: XMC_UA (0x4) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -114,8 +115,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_ER (0x0) ; SYM-NEXT: StorageMappingClass: XMC_UA (0x4) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -134,8 +136,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_ER (0x0) ; SYM-NEXT: StorageMappingClass: XMC_UA (0x4) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -154,8 +157,9 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_ER (0x0) ; SYM-NEXT: StorageMappingClass: XMC_PR (0x0) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; SYM-NEXT: Symbol { @@ -174,15 +178,17 @@ ; SYM-NEXT: SymbolAlignmentLog2: 0 ; SYM-NEXT: SymbolType: XTY_ER (0x0) ; SYM-NEXT: StorageMappingClass: XMC_DS (0xA) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: } ; Test TOC entry symbol generation. ; SYM: Symbol {{[{][[:space:]] *}}Index: [[#TOC_INDX:]]{{[[:space:]] *}}Name: TOC -; SYM-NEXT: Value (RelocatableAddress): 0xA8 +; SYM32-NEXT: Value (RelocatableAddress): 0xA8 +; SYM64-NEXT: Value (RelocatableAddress): 0xC0 ; SYM-NEXT: Section: .data ; SYM-NEXT: Type: 0x0 ; SYM-NEXT: StorageClass: C_HIDEXT (0x6B) @@ -195,167 +201,200 @@ ; SYM-NEXT: SymbolAlignmentLog2: 2 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC0 (0xF) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+2]] ; SYM-NEXT: Name: a -; SYM-NEXT: Value (RelocatableAddress): 0xA8 +; SYM32-NEXT: Value (RelocatableAddress): 0xA8 +; SYM64-NEXT: Value (RelocatableAddress): 0xC0 ; 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: [[#TOC_INDX+3]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+4]] ; SYM-NEXT: Name: b -; SYM-NEXT: Value (RelocatableAddress): 0xAC +; SYM32-NEXT: Value (RelocatableAddress): 0xAC +; SYM64-NEXT: Value (RelocatableAddress): 0xC8 ; 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: [[#TOC_INDX+5]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+6]] ; SYM-NEXT: Name: c -; SYM-NEXT: Value (RelocatableAddress): 0xB0 +; SYM32-NEXT: Value (RelocatableAddress): 0xB0 +; SYM64-NEXT: Value (RelocatableAddress): 0xD0 ; 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: [[#TOC_INDX+7]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+8]] ; SYM-NEXT: Name: globa -; SYM-NEXT: Value (RelocatableAddress): 0xB4 +; SYM32-NEXT: Value (RelocatableAddress): 0xB4 +; SYM64-NEXT: Value (RelocatableAddress): 0xD8 ; 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: [[#TOC_INDX+9]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+10]] ; SYM-NEXT: Name: ptr -; SYM-NEXT: Value (RelocatableAddress): 0xB8 +; SYM32-NEXT: Value (RelocatableAddress): 0xB8 +; SYM64-NEXT: Value (RelocatableAddress): 0xE0 ; 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: [[#TOC_INDX+11]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+12]] ; SYM-NEXT: Name: bar -; SYM-NEXT: Value (RelocatableAddress): 0xBC +; SYM32-NEXT: Value (RelocatableAddress): 0xBC +; SYM64-NEXT: Value (RelocatableAddress): 0xE8 ; 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: [[#TOC_INDX+13]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+14]] ; SYM-NEXT: Name: foo -; SYM-NEXT: Value (RelocatableAddress): 0xC0 +; SYM32-NEXT: Value (RelocatableAddress): 0xC0 +; SYM64-NEXT: Value (RelocatableAddress): 0xF0 ; 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: [[#TOC_INDX+15]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; 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: [[#TOC_INDX+16]] ; SYM-NEXT: Name: foobar -; SYM-NEXT: Value (RelocatableAddress): 0xC4 +; SYM32-NEXT: Value (RelocatableAddress): 0xC4 +; SYM64-NEXT: Value (RelocatableAddress): 0xF8 ; 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: [[#TOC_INDX+17]] -; SYM-NEXT: SectionLen: 4 +; SYM32-NEXT: SectionLen: 4 +; SYM64-NEXT: SectionLen: 8 ; SYM-NEXT: ParameterHashIndex: 0x0 ; SYM-NEXT: TypeChkSectNum: 0x0 -; SYM-NEXT: SymbolAlignmentLog2: 2 +; SYM32-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolAlignmentLog2: 3 ; SYM-NEXT: SymbolType: XTY_SD (0x1) ; SYM-NEXT: StorageMappingClass: XMC_TC (0x3) -; SYM-NEXT: StabInfoIndex: 0x0 -; SYM-NEXT: StabSectNum: 0x0 +; SYM32-NEXT: StabInfoIndex: 0x0 +; SYM32-NEXT: StabSectNum: 0x0 +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) ; SYM-NEXT: } ; SYM-NEXT: }