[llvm] r185012 - [mips] Do not emit ".option pic0" if target is mips64.
Akira Hatanaka
ahatanaka at mips.com
Wed Jun 26 12:08:49 PDT 2013
Author: ahatanak
Date: Wed Jun 26 14:08:49 2013
New Revision: 185012
URL: http://llvm.org/viewvc/llvm-project?rev=185012&view=rev
Log:
[mips] Do not emit ".option pic0" if target is mips64.
Modified:
llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
llvm/trunk/test/MC/Mips/abicalls.ll
Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=185012&r1=185011&r2=185012&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Wed Jun 26 14:08:49 2013
@@ -562,7 +562,7 @@ void MipsAsmPrinter::EmitStartOfAsmFile(
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"));
}
Modified: llvm/trunk/test/MC/Mips/abicalls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/abicalls.ll?rev=185012&r1=185011&r2=185012&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/abicalls.ll (original)
+++ llvm/trunk/test/MC/Mips/abicalls.ll Wed Jun 26 14:08:49 2013
@@ -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
More information about the llvm-commits
mailing list