Make FGR64RegisterClass available if target is Mips64.

llvm-svn: 140397
This commit is contained in:
Akira Hatanaka 2011-09-23 18:28:39 +00:00
parent 3aa2889cc7
commit ceb55e72de
1 changed files with 6 additions and 1 deletions

View File

@ -84,6 +84,7 @@ MipsTargetLowering::
MipsTargetLowering(MipsTargetMachine &TM)
: TargetLowering(TM, new MipsTargetObjectFile()) {
Subtarget = &TM.getSubtarget<MipsSubtarget>();
bool HasMips64 = Subtarget->hasMips64();
// Mips does not have i1 type, so use i32 for
// setcc operations results (slt, sgt, ...).
@ -95,8 +96,12 @@ MipsTargetLowering(MipsTargetMachine &TM)
addRegisterClass(MVT::f32, Mips::FGR32RegisterClass);
// When dealing with single precision only, use libcalls
if (!Subtarget->isSingleFloat())
if (!Subtarget->isSingleFloat()) {
if (HasMips64)
addRegisterClass(MVT::f64, Mips::FGR64RegisterClass);
else
addRegisterClass(MVT::f64, Mips::AFGR64RegisterClass);
}
// Load extented operations for i1 types must be promoted
setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote);