diff --git a/llvm/lib/MC/XCOFFObjectWriter.cpp b/llvm/lib/MC/XCOFFObjectWriter.cpp --- a/llvm/lib/MC/XCOFFObjectWriter.cpp +++ b/llvm/lib/MC/XCOFFObjectWriter.cpp @@ -287,21 +287,16 @@ void assignAddressesAndIndices(const MCAsmLayout &); void finalizeSectionInfo(); - bool - needsAuxiliaryHeader() const { /* TODO aux header support not implemented. */ - return false; - } - - // Returns the size of the auxiliary header to be written to the object file. - size_t auxiliaryHeaderSize() const { - assert(!needsAuxiliaryHeader() && - "Auxiliary header support not implemented."); - return 0; - } - public: XCOFFObjectWriter(std::unique_ptr MOTW, raw_pwrite_stream &OS); + + void writeWord(uint64_t Word) { + if (is64Bit()) + W.write(Word); + else + W.write(Word); + } }; XCOFFObjectWriter::XCOFFObjectWriter( @@ -405,8 +400,6 @@ void XCOFFObjectWriter::executePostLayoutBinding(MCAssembler &Asm, const MCAsmLayout &Layout) { - if (TargetObjectWriter->is64Bit()) - report_fatal_error("64-bit XCOFF object files are not supported yet."); for (const auto &S : Asm) { const auto *MCSec = cast(&S); @@ -616,20 +609,20 @@ if (Asm.isIncrementalLinkerCompatible()) report_fatal_error("Incremental linking not supported for XCOFF."); - if (TargetObjectWriter->is64Bit()) - report_fatal_error("64-bit XCOFF object files are not supported yet."); - finalizeSectionInfo(); uint64_t StartOffset = W.OS.tell(); writeFileHeader(); writeSectionHeaderTable(); - writeSections(Asm, Layout); - writeRelocations(); - writeSymbolTable(Layout); - // Write the string table. - Strings.write(W.OS); + if (!is64Bit()) { + writeSections(Asm, Layout); + writeRelocations(); + + writeSymbolTable(Layout); + // Write the string table. + Strings.write(W.OS); + } return W.OS.tell() - StartOffset; } @@ -724,12 +717,19 @@ void XCOFFObjectWriter::writeFileHeader() { W.write(is64Bit() ? XCOFF::XCOFF64 : XCOFF::XCOFF32); - W.write(SectionCount); // f_nscns - W.write(0); // f_timdat - W.write(SymbolTableOffset); // f_symptr - W.write(SymbolTableEntryCount); // f_nsyms - W.write(0); // f_opthdr - W.write(0); // f_flags + W.write(SectionCount); // f_nscns + W.write(0); // f_timdat + writeWord(SymbolTableOffset); // f_symptr + if (is64Bit()) { + W.write(0); // f_opthdr. No optional header for an object file + // that is not to be loaded. + W.write(0); // f_flags + W.write(0); // f_nsyms. Not supported yet. + } else { + W.write(SymbolTableEntryCount); // f_nsyms + W.write(0); // f_opthdr + W.write(0); // f_flags + } } void XCOFFObjectWriter::writeSectionHeaderTable() { @@ -746,21 +746,28 @@ // are the same. // We use 0 for DWARF sections' Physical and Virtual Addresses. if (!IsDwarf) { - W.write(Sec->Address); // s_paddr = s_vaddr - W.write(Sec->Address); + writeWord(Sec->Address); // s_paddr = s_vaddr + writeWord(Sec->Address); } else { - W.write(0); - W.write(0); + writeWord(0); + writeWord(0); } - W.write(Sec->Size); // s_size - W.write(Sec->FileOffsetToData); // s_scnptr - W.write(Sec->FileOffsetToRelocations); // s_relptr - W.write(0); // s_lnnoptr. Not supported yet. + writeWord(Sec->Size); // s_size + writeWord(Sec->FileOffsetToData); // s_scnptr + writeWord(Sec->FileOffsetToRelocations); // s_relptr + writeWord(0); // s_lnnoptr. Not supported yet. - W.write(Sec->RelocationCount); // s_nreloc - W.write(0); // s_nlnno. Not supported yet. - W.write(Sec->Flags); // s_flags + if (is64Bit()) { + W.write(0); // s_nreloc. Not supported yet. + W.write(0); // s_nlnno. Not supported yet. + W.write(Sec->Flags); // s_flags + W.OS.write_zeros(4); + } else { + W.write(Sec->RelocationCount); // s_nreloc + W.write(0); // s_nlnno. Not supported yet. + W.write(Sec->Flags); // s_flags + } return true; }; @@ -1021,8 +1028,10 @@ SymbolTableEntryCount = SymbolTableIndex; // Calculate the RawPointer value for each section. - uint64_t RawPointer = XCOFF::FileHeaderSize32 + auxiliaryHeaderSize() + - SectionCount * XCOFF::SectionHeaderSize32; + uint64_t RawPointer = is64Bit() ? (XCOFF::FileHeaderSize64 + + SectionCount * XCOFF::SectionHeaderSize64) + : (XCOFF::FileHeaderSize32 + + SectionCount * XCOFF::SectionHeaderSize32); for (auto *Sec : Sections) { if (Sec->Index == SectionEntry::UninitializedIndex || Sec->IsVirtual) continue; diff --git a/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll b/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll --- a/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll +++ b/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll @@ -11,10 +11,7 @@ ; RUN: llvm-readobj --symbols %t.o | \ ; RUN: FileCheck --check-prefix=XCOFF32 %s -; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @_ZN3Foo1aE = available_externally constant i32 -1 diff --git a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll @@ -8,11 +8,7 @@ ; 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. - +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @foo_ext_weak_p = global void (...)* bitcast (void ()* @foo_ext_weak_ref to void (...)*) @b_w = extern_weak global i32 diff --git a/llvm/test/CodeGen/PowerPC/aix-extern.ll b/llvm/test/CodeGen/PowerPC/aix-extern.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern.ll @@ -8,9 +8,7 @@ ; 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 | FileCheck --check-prefix=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @bar_p = global i32 (...)* @bar_ref, align 4 @b_e = external global i32, align 4 diff --git a/llvm/test/CodeGen/PowerPC/aix-func-align.ll b/llvm/test/CodeGen/PowerPC/aix-func-align.ll --- a/llvm/test/CodeGen/PowerPC/aix-func-align.ll +++ b/llvm/test/CodeGen/PowerPC/aix-func-align.ll @@ -9,9 +9,7 @@ ; RUN: -xcoff-traceback-table=false -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=XCOFF64 %s -; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. define i32 @foo() align 32 { entry: diff --git a/llvm/test/CodeGen/PowerPC/aix-internal.ll b/llvm/test/CodeGen/PowerPC/aix-internal.ll --- a/llvm/test/CodeGen/PowerPC/aix-internal.ll +++ b/llvm/test/CodeGen/PowerPC/aix-internal.ll @@ -1,8 +1,8 @@ ; 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 + +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. define internal i32 @foo() { ret i32 1 @@ -34,5 +34,3 @@ ; Make sure no label is emitted. ; CHECK-NOT: Name: foo - -;64-CHECK: LLVM ERROR: 64-bit XCOFF object files are not supported yet. diff --git a/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll b/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll --- a/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll +++ b/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll @@ -9,10 +9,7 @@ ; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s ; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. %struct.S = type { i32, i32 } diff --git a/llvm/test/CodeGen/PowerPC/aix-overflow-toc.py b/llvm/test/CodeGen/PowerPC/aix-overflow-toc.py --- a/llvm/test/CodeGen/PowerPC/aix-overflow-toc.py +++ b/llvm/test/CodeGen/PowerPC/aix-overflow-toc.py @@ -11,10 +11,7 @@ # 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. +## FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. numentries = 12290 for x in range(0, numentries): diff --git a/llvm/test/CodeGen/PowerPC/aix-return55.ll b/llvm/test/CodeGen/PowerPC/aix-return55.ll --- a/llvm/test/CodeGen/PowerPC/aix-return55.ll +++ b/llvm/test/CodeGen/PowerPC/aix-return55.ll @@ -5,9 +5,7 @@ ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s ; RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=CHECKSECT %s -; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @a = global i64 320255973571806, align 8 @d = global double 5.000000e+00, align 8 diff --git a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll --- a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll +++ b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll @@ -10,8 +10,7 @@ ; 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: 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. ; SECTION: File: {{.*}}aix-tls-xcoff-variables.ll.tmp.o ; SECTION-NEXT: Format: aixcoff-rs6000 diff --git a/llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll b/llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll --- a/llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll +++ b/llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll @@ -12,9 +12,7 @@ ; 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 +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. ; Test verifies: ; If there exists a user-defined function whose name is the same as the @@ -117,5 +115,3 @@ ; 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. diff --git a/llvm/test/CodeGen/PowerPC/aix-weak.ll b/llvm/test/CodeGen/PowerPC/aix-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-weak.ll @@ -8,10 +8,7 @@ ; RUN: -mattr=-altivec -data-sections=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 -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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @foo_weak_p = global void (...)* bitcast (void ()* @foo_ref_weak to void (...)*), align 4 @b = weak global i32 0, align 4 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll @@ -4,9 +4,7 @@ ; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @a = external global i32, align 4 @b = external global i64, align 8 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll @@ -9,9 +9,10 @@ ; RUN: FileCheck --check-prefix=OBJ %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s -; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --section-headers --file-header %t64.o | \ +; RUN: FileCheck --check-prefix=OBJ64 %s @ivar = local_unnamed_addr global i32 35, align 4 @llvar = local_unnamed_addr global i64 36, align 8 @@ -681,3 +682,58 @@ ; SYMS-NEXT: } ; SYMS-NEXT: } ; SYMS: ] + +; OBJ64: Format: aix5coff64-rs6000 +; OBJ64-NEXT: Arch: powerpc64 +; OBJ64-NEXT: AddressSize: 64bit +; OBJ64-NEXT: FileHeader { +; OBJ64-NEXT: Magic: 0x1F7 +; OBJ64-NEXT: NumberOfSections: 3 +; OBJ64-NEXT: TimeStamp: None (0x0) +; OBJ64-NEXT: SymbolTableOffset: 0x170 +; OBJ64-NEXT: SymbolTableEntries: 0 +; OBJ64-NEXT: OptionalHeaderSize: 0x0 +; OBJ64-NEXT: Flags: 0x0 +; OBJ64-NEXT: } + +; OBJ64: Sections [ +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: [[#OBJ64_INDX:]] +; OBJ64-NEXT: Name: .text +; OBJ64-NEXT: PhysicalAddress: 0x0 +; OBJ64-NEXT: VirtualAddress: 0x0 +; OBJ64-NEXT: Size: 0x0 +; OBJ64-NEXT: RawDataOffset: 0xF0 +; OBJ64-NEXT: RelocationPointer: 0x0 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 0 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_TEXT (0x20) +; OBJ64-NEXT: } +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: [[#OBJ64_INDX+1]] +; OBJ64-NEXT: Name: .data +; OBJ64-NEXT: PhysicalAddress: 0x0 +; OBJ64-NEXT: VirtualAddress: 0x0 +; OBJ64-NEXT: Size: 0x80 +; OBJ64-NEXT: RawDataOffset: 0xF0 +; OBJ64-NEXT: RelocationPointer: 0x0 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 0 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_DATA (0x40) +; OBJ64-NEXT: } +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: [[#OBJ64_INDX+2]] +; OBJ64-NEXT: Name: .bss +; OBJ64-NEXT: PhysicalAddress: 0x80 +; OBJ64-NEXT: VirtualAddress: 0x80 +; OBJ64-NEXT: Size: 0x6C +; OBJ64-NEXT: RawDataOffset: 0x0 +; OBJ64-NEXT: RelocationPointer: 0x0 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 0 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_BSS (0x80) +; OBJ64-NEXT: } +; OBJ64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll @@ -8,10 +8,7 @@ ; RUN: llvm-readobj --symbols %t.o | \ ; RUN: FileCheck --check-prefix=XCOFF32 %s -; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @La = external global i32, align 4 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll @@ -20,13 +20,7 @@ ; 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: 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @c = external global i8, align 1 @arr = global [SIZE x i8*] [MACRO], align 8 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll @@ -6,9 +6,7 @@ ; RUN: FileCheck --check-prefix=OBJ %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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @a = internal global i32 0, align 4 @b = internal global i64 0, align 8 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll @@ -6,10 +6,7 @@ ; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @common = common global i32 0, align 4 @pointer = global i32* @common, align 4 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll @@ -7,9 +7,7 @@ ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @globalA = global i32 1, align 4 @globalB = global i32 2, align 4 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll @@ -9,9 +9,7 @@ ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s ; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @const_ivar = constant i32 35, align 4 @const_llvar = constant i64 36, align 8 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll @@ -9,9 +9,7 @@ ; RUN: --xcoff-traceback-table=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYM %s -; 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. +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @a = external global i32, align 4 @b = external global i64, align 8 diff --git a/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll b/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll --- a/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll +++ b/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll @@ -2,10 +2,8 @@ ; RUN: not --crash llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff \ ; RUN: -verify-machineinstrs < %s 2>&1 | \ ; RUN: FileCheck %s --check-prefix=OBJ32 -; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -verify-machineinstrs < %s | FileCheck %s -; RUN: not --crash llc -filetype=obj -mtriple powerpc64-ibm-aix-xcoff \ -; RUN: -verify-machineinstrs < %s 2>&1 | \ -; RUN: FileCheck %s --check-prefix=OBJ64 + +;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. @i = external global i32, align 4 #0 @@ -20,6 +18,5 @@ ; CHECK-NEXT: .extern i[TD] ; OBJ32: LLVM ERROR: toc-data not yet supported when writing object files. -; OBJ64: LLVM ERROR: 64-bit XCOFF object files are not supported yet. attributes #0 = { "toc-data" }