mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
224192bde8
This patch makes one change to GOT handling and two changes to N64's relocation model handling. Furthermore, the jumptable encodings have been corrected for static N64. Big GOT handling is now done via a new SDNode MipsGotHi - this node is unconditionally lowered to an lui instruction. The first change to N64's relocation handling is the lifting of the restriction that N64 always uses PIC. Now it is possible to target static environments. The second change adds support for 64 bit symbols and enables them by default. Previously N64 had patterns for sym32 mode only. In this mode all symbols are assumed to have 32 bit addresses. sym32 mode support is selectable with attribute 'sym32'. A follow on patch for clang will add the necessary frontend parameter. This partially resolves PR/23485. Thanks to Brooks Davis for reporting the issue! This version corrects a "Conditional jump or move depends on uninitialised value(s)" error detected by valgrind present in the original commit. Reviewers: dsanders, seanbruno, zoran.jovanovic, vkalintiris Differential Revision: https://reviews.llvm.org/D23652 llvm-svn: 293279
89 lines
3.6 KiB
LLVM
89 lines
3.6 KiB
LLVM
; Check the emission of directives at the start of an asm file.
|
|
|
|
; ### O32 ABI ###
|
|
; RUN: llc -filetype=asm -mtriple mips-unknown-linux -mcpu=mips32 \
|
|
; RUN: -relocation-model=static %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-STATIC-O32,CHECK-STATIC-O32-NLEGACY %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips-unknown-linux -mcpu=mips32 \
|
|
; RUN: -relocation-model=pic %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-PIC-O32,CHECK-PIC-O32-NLEGACY %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips-unknown-linux -mcpu=mips32 \
|
|
; RUN: -relocation-model=static -mattr=+nan2008 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-STATIC-O32,CHECK-STATIC-O32-N2008 %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips-unknown-linux -mcpu=mips32 \
|
|
; RUN: -relocation-model=pic -mattr=+nan2008 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-PIC-O32,CHECK-PIC-O32-N2008 %s
|
|
|
|
; ### N32 ABI ###
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=static -target-abi n32 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-STATIC-N32,CHECK-STATIC-N32-NLEGACY %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=pic -target-abi n32 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-PIC-N32,CHECK-PIC-N32-NLEGACY %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=static -target-abi n32 -mattr=+nan2008 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-STATIC-N32,CHECK-STATIC-N32-N2008 %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=pic -target-abi n32 -mattr=+nan2008 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-PIC-N32,CHECK-PIC-N32-N2008 %s
|
|
|
|
; ### N64 ABI ###
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=static -target-abi n64 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-STATIC-N64,CHECK-STATIC-N64-NLEGACY %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=pic -target-abi n64 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-PIC-N64,CHECK-PIC-N64-NLEGACY %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=static -target-abi n64 -mattr=+nan2008 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-STATIC-N64,CHECK-STATIC-N64-N2008 %s
|
|
|
|
; RUN: llc -filetype=asm -mtriple mips64-unknown-linux -mcpu=mips64 \
|
|
; RUN: -relocation-model=pic -target-abi n64 -mattr=+nan2008 %s -o - | \
|
|
; RUN: FileCheck -check-prefixes=CHECK-PIC-N64,CHECK-PIC-N64-N2008 %s
|
|
|
|
; CHECK-STATIC-O32: .abicalls
|
|
; CHECK-STATIC-O32: .option pic0
|
|
; CHECK-STATIC-O32: .section .mdebug.abi32
|
|
; CHECK-STATIC-O32-NLEGACY: .nan legacy
|
|
; CHECK-STATIC-O32-N2008: .nan 2008
|
|
|
|
; CHECK-PIC-O32: .abicalls
|
|
; CHECK-PIC-O32-NOT: .option pic0
|
|
; CHECK-PIC-O32: .section .mdebug.abi32
|
|
; CHECK-PIC-O32-NLEGACY: .nan legacy
|
|
; CHECK-PIC-O32-N2008: .nan 2008
|
|
|
|
; CHECK-STATIC-N32: .abicalls
|
|
; CHECK-STATIC-N32: .option pic0
|
|
; CHECK-STATIC-N32: .section .mdebug.abiN32
|
|
; CHECK-STATIC-N32-NLEGACY: .nan legacy
|
|
; CHECK-STATIC-N32-N2008: .nan 2008
|
|
|
|
; CHECK-PIC-N32: .abicalls
|
|
; CHECK-PIC-N32-NOT: .option pic0
|
|
; CHECK-PIC-N32: .section .mdebug.abiN32
|
|
; CHECK-PIC-N32-NLEGACY: .nan legacy
|
|
; CHECK-PIC-N32-N2008: .nan 2008
|
|
|
|
; CHECK-STATIC-N64-NOT: .abicalls
|
|
; CHECK-STATIC-N64-NOT: .option pic0
|
|
; CHECK-STATIC-N64: .section .mdebug.abi64
|
|
; CHECK-STATIC-N64-NLEGACY: .nan legacy
|
|
; CHECK-STATIC-N64-N2008: .nan 2008
|
|
|
|
; CHECK-PIC-N64: .abicalls
|
|
; CHECK-PIC-N64-NOT: .option pic0
|
|
; CHECK-PIC-N64: .section .mdebug.abi64
|
|
; CHECK-PIC-N64-NLEGACY: .nan legacy
|
|
; CHECK-PIC-N64-N2008: .nan 2008
|