#define DEBUG_TYPE "mips-subtarget"
#include "MipsMachineFunction.h"
-#include "MipsSubtarget.h"
-#include "MipsTargetMachine.h"
#include "Mips.h"
#include "MipsRegisterInfo.h"
+#include "MipsSubtarget.h"
+#include "MipsTargetMachine.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/CommandLine.h"
static cl::opt<bool>
Mips16ConstantIslands(
- "mips16-constant-islands", cl::Hidden,
- cl::desc("MIPS: mips16 constant islands enable. experimental feature"),
- cl::init(false));
+ "mips16-constant-islands", cl::NotHidden,
+ cl::desc("MIPS: mips16 constant islands enable."),
+ cl::init(true));
void MipsSubtarget::anchor() { }
// Parse features string.
ParseSubtargetFeatures(CPUName, FS);
+ if (InMips16Mode && !TM->Options.UseSoftFloat) {
+ // Hard float for mips16 means essentially to compile as soft float
+ // but to use a runtime library for soft float that is written with
+ // native mips32 floating point instructions (those runtime routines
+ // run in mips32 hard float mode).
+ TM->Options.UseSoftFloat = true;
+ TM->Options.FloatABIType = FloatABI::Soft;
+ InMips16HardFloat = true;
+ }
+
PreviousInMips16Mode = InMips16Mode;
// Initialize scheduling itinerary for the specified CPU.