diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 3 | 
2 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp index f00a9fe20ef..ba645d2f6ab 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp @@ -699,8 +699,11 @@ void MipsTargetAsmStreamer::emitDirectiveCpreturn(unsigned SaveLocation,  }  void MipsTargetAsmStreamer::emitDirectiveModuleFP() { -  OS << "\t.module\tfp="; -  OS << ABIFlagsSection.getFpABIString(ABIFlagsSection.getFpABI()) << "\n"; +  MipsABIFlagsSection::FpABIKind FpABI = ABIFlagsSection.getFpABI(); +  if (FpABI == MipsABIFlagsSection::FpABIKind::SOFT) +    OS << "\t.module\tsoftfloat\n"; +  else +    OS << "\t.module\tfp=" << ABIFlagsSection.getFpABIString(FpABI) << "\n";  }  void MipsTargetAsmStreamer::emitDirectiveSetFp( diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp index d4a8d41c460..c523e20ab03 100644 --- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp @@ -812,7 +812,8 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {    // We should always emit a '.module fp=...' but binutils 2.24 does not accept    // it. We therefore emit it when it contradicts the ABI defaults (-mfpxx or    // -mfp64) and omit it otherwise. -  if (ABI.IsO32() && (STI.isABI_FPXX() || STI.isFP64bit())) +  if ((ABI.IsO32() && (STI.isABI_FPXX() || STI.isFP64bit())) || +      STI.useSoftFloat())      TS.emitDirectiveModuleFP();    // We should always emit a '.module [no]oddspreg' but binutils 2.24 does not  | 

