[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
|
|
|
|
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck %s
|
|
|
|
|
2019-12-05 00:22:57 +08:00
|
|
|
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s
|
|
|
|
; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s
|
|
|
|
|
2020-02-12 15:01:35 +08:00
|
|
|
; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \
|
2019-12-05 00:22:57 +08:00
|
|
|
; RUN: FileCheck --check-prefix=OBJ64 %s
|
|
|
|
; OBJ64: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
|
|
|
|
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
@a = external global i32, align 4
|
|
|
|
@b = external global i64, align 8
|
|
|
|
@c = external global i16, align 2
|
|
|
|
@globa = common global i32 0, align 4
|
|
|
|
|
|
|
|
@ptr = internal global void (...)* null, align 4
|
|
|
|
|
|
|
|
; CHECK-NOT: .toc
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYMS-NOT: Name: TOC
|