1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[mips] Do not emit ".option pic0" if target is mips64.

llvm-svn: 185012
This commit is contained in:
Akira Hatanaka 2013-06-26 19:08:49 +00:00
parent 1f2c22ad07
commit 677f305c97
2 changed files with 3 additions and 1 deletions

View File

@ -562,7 +562,7 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {
if (OutStreamer.hasRawTextSupport()) {
OutStreamer.EmitRawText(StringRef("\t.abicalls"));
Reloc::Model RM = Subtarget->getRelocationModel();
if (RM == Reloc::Static)
if (RM == Reloc::Static && !Subtarget->hasMips64())
OutStreamer.EmitRawText(StringRef("\t.option\tpic0"));
}

View File

@ -7,6 +7,8 @@
; RUN: llc -filetype=asm -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-STATIC %s
; RUN: llc -filetype=asm -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | FileCheck -check-prefix=CHECK-PIC %s
; RUN: llc -filetype=asm -mtriple mips64el-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-PIC %s
; CHECK-STATIC: .abicalls
; CHECK-STATIC-NEXT: pic0
; CHECK-PIC: .abicalls