[PATCH] D81104: [XCOFF][AIX] report_fatal_error when an overflow section is needed

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 06:34:29 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-overflow.ll:7
+; RUN: grep -v sed  %s | \
+; RUN:   sed "s/A/ABABA/g;s/A/ABABA/g;s/A/ABABA/g;s/A/ABABA/g;s/A/ABABA/g;s/A/ABABA/g;s/A/ABABA/g;s/A/ABABA/g;s/A/ABABA/g;s/A/ABA/g;s/A/ABA/g;" | tr B "\n" | \
+; RUN:   sed "s/A/call\ void\ bitcast\ \(void (...)*\ @foo\ to\ void\ ()*)()/g" > %t.ll
----------------
I suggest testing exactly 65535:
```
; RUN: grep -v RUN: %s | \
; 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/#/i8* @c/g;'
; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \
; RUN:     -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.overflow.ll 2>&1 | \
; RUN:   FileCheck --check-prefix=XCOFF32 %s
; XCOFF32: LLVM ERROR: relocation entries overflowed; overflow section is not implemented yet

; 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
; 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
```

Also, I think we should test for 65534.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81104/new/

https://reviews.llvm.org/D81104





More information about the llvm-commits mailing list