mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
f8a477d8bf
Summary: This patch implements the backend implementation of adding global variables directly to the table of contents (TOC), rather than adding the address of the variable to the TOC. Currently, this patch will look for the "toc-data" attribute on symbols in the IR, and then add those symbols to the TOC. ATM, this is implemented for 32 bit AIX. Reviewers: sfertile Differential Revision: https://reviews.llvm.org/D101178
21 lines
577 B
LLVM
21 lines
577 B
LLVM
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -verify-machineinstrs < %s | FileCheck %s
|
|
; RUN: not --crash llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff \
|
|
; RUN: -verify-machineinstrs < %s 2>&1 | \
|
|
; RUN: FileCheck %s --check-prefix=OBJ
|
|
|
|
@i = external global i32, align 4 #0
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define i32* @get() {
|
|
entry:
|
|
ret i32* @i
|
|
}
|
|
|
|
; CHECK: la 3, i[TD](2)
|
|
; CHECK: .toc
|
|
; CHECK-NEXT: .extern i[TD]
|
|
|
|
; OBJ: LLVM ERROR: toc-data not yet supported when writing object files.
|
|
|
|
attributes #0 = { "toc-data" }
|