forked from OSchip/llvm-project
[lld][mips] Correct tests for mips64 implying PIC.
Currently LLVM can only generate PIC code for MIPS64 with the N64 as it uses the idiom "isPositionIndependent() || IsABI_N64()" throughout the MIPS backend. r293164 changed this, causing test failures for LLD. This patch changes the tests minimally to preserve existing test coverage and one case where the test was "right" in the wrong circumstance. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D29194 llvm-svn: 293275
This commit is contained in:
parent
4015bf8372
commit
73190d3906
|
@ -274,7 +274,8 @@
|
|||
# MIPSEL-NEXT: EF_MIPS_CPIC
|
||||
# MIPSEL-NEXT: ]
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %tmips64
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux -position-independent \
|
||||
# RUN: %s -o %tmips64
|
||||
# RUN: ld.lld -m elf64btsmip -e _start %tmips64 -o %t2mips64
|
||||
# RUN: llvm-readobj -file-headers %t2mips64 | FileCheck --check-prefix=MIPS64 %s
|
||||
# RUN: ld.lld %tmips64 -e _start -o %t3mips64
|
||||
|
@ -301,7 +302,8 @@
|
|||
# MIPS64-NEXT: EF_MIPS_PIC
|
||||
# MIPS64-NEXT: ]
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64el-unknown-linux %s -o %tmips64el
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64el-unknown-linux \
|
||||
# RUN: -position-independent %s -o %tmips64el
|
||||
# RUN: ld.lld -m elf64ltsmip -e _start %tmips64el -o %t2mips64el
|
||||
# RUN: llvm-readobj -file-headers %t2mips64el | FileCheck --check-prefix=MIPS64EL %s
|
||||
# RUN: ld.lld %tmips64el -e _start -o %t3mips64el
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
|
||||
# RUN: -mcpu=mips64r6 %S/Inputs/mips-dynamic.s -o %t1.o
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
|
||||
# RUN: -mcpu=octeon %s -o %t2.o
|
||||
# RUN: -position-independent -mcpu=octeon %s -o %t2.o
|
||||
# RUN: not ld.lld %t1.o %t2.o -o %t.exe 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=R6OCTEON %s
|
||||
|
||||
|
@ -35,9 +35,9 @@
|
|||
# Check that lld take in account EF_MIPS_MACH_XXX ISA flags
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
|
||||
# RUN: -mcpu=mips64 %S/Inputs/mips-dynamic.s -o %t1.o
|
||||
# RUN: -position-independent -mcpu=mips64 %S/Inputs/mips-dynamic.s -o %t1.o
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
|
||||
# RUN: -mcpu=octeon %s -o %t2.o
|
||||
# RUN: -position-independent -mcpu=octeon %s -o %t2.o
|
||||
# RUN: ld.lld %t1.o %t2.o -o %t.exe
|
||||
# RUN: llvm-readobj -h %t.exe | FileCheck -check-prefix=OCTEON %s
|
||||
|
||||
|
@ -79,8 +79,7 @@ __start:
|
|||
# OCTEON-NEXT: EF_MIPS_ARCH_64R2
|
||||
# OCTEON-NEXT: EF_MIPS_CPIC
|
||||
# OCTEON-NEXT: EF_MIPS_MACH_OCTEON
|
||||
# OCTEON-NEXT: EF_MIPS_PIC
|
||||
# OCTEON-NEXT: ]
|
||||
# OCTEON: ]
|
||||
|
||||
# N32O32: error: {{.*}}mips-elf-flags-err.s.tmp2.o is incompatible with {{.*}}mips-elf-flags-err.s.tmp1.o
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
# RUN: | FileCheck -check-prefix=EXE-R6 %s
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
|
||||
# RUN: -mcpu=octeon %s -o %t.o
|
||||
# RUN: -position-independent -mcpu=octeon %s -o %t.o
|
||||
# RUN: ld.lld %t.o -o %t.exe
|
||||
# RUN: llvm-readobj -h -mips-abi-flags %t.exe \
|
||||
# RUN: | FileCheck -check-prefix=OCTEON %s
|
||||
|
|
Loading…
Reference in New Issue