summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/Mips/MipsAsmPrinter.cpp2
-rw-r--r--llvm/test/MC/Mips/abicalls.ll2
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index bab70afd398..c037c0502e7 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -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"));
}
diff --git a/llvm/test/MC/Mips/abicalls.ll b/llvm/test/MC/Mips/abicalls.ll
index a93ae6d9c66..7b98b02d05a 100644
--- a/llvm/test/MC/Mips/abicalls.ll
+++ b/llvm/test/MC/Mips/abicalls.ll
@@ -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
OpenPOWER on IntegriCloud