mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
[mips] Add initial support for NaN2008 in the back-end.
This is so that EF_MIPS_NAN2008 is set if we are using IEEE 754-2008 NaN encoding (-mnan=2008). This patch also adds support for parsing '.nan legacy' and '.nan 2008' assembly directives. The handling of these directives should match GAS' behaviour i.e., the last directive in use sets the ELF header bit (EF_MIPS_NAN2008). Differential Revision: http://reviews.llvm.org/D3346 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206396 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -637,6 +637,12 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {
|
||||
OutStreamer.SwitchSection(OutContext.getELFSection(
|
||||
SectionName, ELF::SHT_PROGBITS, 0, SectionKind::getDataRel()));
|
||||
|
||||
// NaN: At the moment we only support:
|
||||
// 1. .nan legacy (default)
|
||||
// 2. .nan 2008
|
||||
Subtarget->isNaN2008() ? getTargetStreamer().emitDirectiveNaN2008()
|
||||
: getTargetStreamer().emitDirectiveNaNLegacy();
|
||||
|
||||
// TODO: handle O64 ABI
|
||||
|
||||
if (Subtarget->isABI_EABI()) {
|
||||
|
Reference in New Issue
Block a user