1;; This test takes a very long time 2; REQUIRES: expensive_checks 3 4;; This test generates 65535 relocation entries in a single section, 5;; which would trigger an overflow section to be generated in 32-bit mode. 6; RUN: grep -v RUN: %s | \ 7; RUN: sed > %t.overflow.ll 's/SIZE/65535/;s/MACRO/#/;s/#/################/g;s/#/################/g;s/#/################/g;s/#/################/g;s/#/#_/g;s/_#_\([^#]\)/\1/;s/_/, /g;s/#/ptr @c/g;' 8; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ 9; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.overflow.o %t.overflow.ll 10; RUN: llvm-readobj --section-headers %t.overflow.o | FileCheck --check-prefix=OVERFLOW %s 11 12;; This test generates 65534 relocation entries, an overflow section should 13;; not be generated. 14; RUN: grep -v RUN: %s | \ 15; RUN: sed >%t.ll 's/SIZE/65534/;s/MACRO/#/;s/#/################/g;s/#/################/g;s/#/################/g;s/#/################/g;s/#/#_/g;s/_#_#_\([^#]\)/\1/;s/_/, /g;s/#/ptr @c/g;' 16; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ 17; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.ll 18; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=XCOFF32 %s 19 20;; An XCOFF64 file may not contain an overflow section header. 21; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ 22; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t64.o %t.overflow.ll 23; RUN: llvm-readobj --section-headers %t64.o | FileCheck --check-prefix=XCOFF64 %s 24 25@c = external global i8, align 1 26@arr = global [SIZE x ptr] [MACRO], align 8 27 28; OVERFLOW: Sections [ 29; OVERFLOW-NEXT: Section { 30; OVERFLOW-NEXT: Index: 1 31; OVERFLOW-NEXT: Name: .text 32; OVERFLOW-NEXT: PhysicalAddress: 0x0 33; OVERFLOW-NEXT: VirtualAddress: 0x0 34; OVERFLOW-NEXT: Size: 0x0 35; OVERFLOW-NEXT: RawDataOffset: 0x8C 36; OVERFLOW-NEXT: RelocationPointer: 0x0 37; OVERFLOW-NEXT: LineNumberPointer: 0x0 38; OVERFLOW-NEXT: NumberOfRelocations: 0 39; OVERFLOW-NEXT: NumberOfLineNumbers: 0 40; OVERFLOW-NEXT: Type: STYP_TEXT (0x20) 41; OVERFLOW-NEXT: } 42; OVERFLOW-NEXT: Section { 43; OVERFLOW-NEXT: Index: 2 44; OVERFLOW-NEXT: Name: .data 45; OVERFLOW-NEXT: PhysicalAddress: 0x0 46; OVERFLOW-NEXT: VirtualAddress: 0x0 47; OVERFLOW-NEXT: Size: 0x3FFFC 48; OVERFLOW-NEXT: RawDataOffset: 0x8C 49; OVERFLOW-NEXT: RelocationPointer: 0x40088 50; OVERFLOW-NEXT: LineNumberPointer: 0x0 51; OVERFLOW-NEXT: NumberOfRelocations: 65535 52; OVERFLOW-NEXT: NumberOfLineNumbers: 65535 53; OVERFLOW-NEXT: Type: STYP_DATA (0x40) 54; OVERFLOW-NEXT: } 55; OVERFLOW-NEXT: Section { 56; OVERFLOW-NEXT: Index: 3 57; OVERFLOW-NEXT: Name: .ovrflo 58; OVERFLOW-NEXT: NumberOfRelocations: 65535 59; OVERFLOW-NEXT: NumberOfLineNumbers: 0 60; OVERFLOW-NEXT: Size: 0x0 61; OVERFLOW-NEXT: RawDataOffset: 0x0 62; OVERFLOW-NEXT: RelocationPointer: 0x40088 63; OVERFLOW-NEXT: LineNumberPointer: 0x0 64; OVERFLOW-NEXT: IndexOfSectionOverflowed: 2 65; OVERFLOW-NEXT: IndexOfSectionOverflowed: 2 66; OVERFLOW-NEXT: Type: STYP_OVRFLO (0x8000) 67; OVERFLOW-NEXT: } 68; OVERFLOW-NEXT: ] 69 70; XCOFF32: Section { 71; XCOFF32: Name: .data 72; XCOFF32-NEXT: PhysicalAddress: 0x0 73; XCOFF32-NEXT: VirtualAddress: 0x0 74; XCOFF32-NEXT: Size: 0x3FFF8 75; XCOFF32-NEXT: RawDataOffset: 0x64 76; XCOFF32-NEXT: RelocationPointer: 0x4005C 77; XCOFF32-NEXT: LineNumberPointer: 0x0 78; XCOFF32-NEXT: NumberOfRelocations: 65534 79; XCOFF32-NEXT: NumberOfLineNumbers: 0 80; XCOFF32-NEXT: Type: STYP_DATA (0x40) 81; XCOFF32-NEXT: } 82 83; XCOFF64: Section { 84; XCOFF64: Name: .data 85; XCOFF64-NEXT: PhysicalAddress: 0x0 86; XCOFF64-NEXT: VirtualAddress: 0x0 87; XCOFF64-NEXT: Size: 0x7FFF8 88; XCOFF64-NEXT: RawDataOffset: 0xA8 89; XCOFF64-NEXT: RelocationPointer: 0x800A0 90; XCOFF64-NEXT: LineNumberPointer: 0x0 91; XCOFF64-NEXT: NumberOfRelocations: 65535 92; XCOFF64-NEXT: NumberOfLineNumbers: 0 93; XCOFF64-NEXT: Type: STYP_DATA (0x40) 94; XCOFF64-NEXT: } 95