diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2019-02-26 14:45:17 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2019-02-26 14:45:17 +0000 |
| commit | 8cb497027d262372d33d56040d513a4935d08b7a (patch) | |
| tree | ba0cbaca6e2bfa322879a79b222c7d0c5cd8498f /llvm/lib/Target/Mips/MipsAsmPrinter.cpp | |
| parent | 0d4f9216aabfefe2dc9e9d74427a9699793db4bc (diff) | |
| download | bcm5719-llvm-8cb497027d262372d33d56040d513a4935d08b7a.tar.gz bcm5719-llvm-8cb497027d262372d33d56040d513a4935d08b7a.zip | |
[mips] Emit `.module softfloat` directive
This change fixes crash on an assertion in case of using
`soft float` ABI for mips32r6 target.
llvm-svn: 354882
Diffstat (limited to 'llvm/lib/Target/Mips/MipsAsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 |

