parent
3dd3df2b55
commit
799479138e
|
|
@ -68,6 +68,7 @@ namespace {
|
||||||
computeRegisterProperties();
|
computeRegisterProperties();
|
||||||
|
|
||||||
addLegalFPImmediate(+0.0); //F31
|
addLegalFPImmediate(+0.0); //F31
|
||||||
|
addLegalFPImmediate(-0.0); //-F31
|
||||||
}
|
}
|
||||||
|
|
||||||
/// LowerArguments - This hook must be implemented to indicate how we should
|
/// LowerArguments - This hook must be implemented to indicate how we should
|
||||||
|
|
@ -348,6 +349,8 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result)
|
||||||
else
|
else
|
||||||
Result = ExprMap[N.getValue(0)] = MakeReg(N.getValue(0).getValueType());
|
Result = ExprMap[N.getValue(0)] = MakeReg(N.getValue(0).getValueType());
|
||||||
|
|
||||||
|
//DestType = N.getValue(0).getValueType();
|
||||||
|
|
||||||
SDOperand Chain = N.getOperand(0);
|
SDOperand Chain = N.getOperand(0);
|
||||||
SDOperand Address = N.getOperand(1);
|
SDOperand Address = N.getOperand(1);
|
||||||
|
|
||||||
|
|
@ -355,7 +358,7 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result)
|
||||||
{
|
{
|
||||||
Select(Chain);
|
Select(Chain);
|
||||||
AlphaLowering.restoreGP(BB);
|
AlphaLowering.restoreGP(BB);
|
||||||
Opc = DestType == MVT::f64 ? Alpha::LDS_SYM : Alpha::LDT_SYM;
|
Opc = DestType == MVT::f64 ? Alpha::LDT_SYM : Alpha::LDS_SYM;
|
||||||
BuildMI(BB, Opc, 1, Result).addGlobalAddress(cast<GlobalAddressSDNode>(Address)->getGlobal());
|
BuildMI(BB, Opc, 1, Result).addGlobalAddress(cast<GlobalAddressSDNode>(Address)->getGlobal());
|
||||||
}
|
}
|
||||||
else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Address)) {
|
else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Address)) {
|
||||||
|
|
@ -370,7 +373,7 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result)
|
||||||
{
|
{
|
||||||
Select(Chain);
|
Select(Chain);
|
||||||
Tmp2 = SelectExpr(Address);
|
Tmp2 = SelectExpr(Address);
|
||||||
Opc = DestType == MVT::f64 ? Alpha::LDS : Alpha::LDT;
|
Opc = DestType == MVT::f64 ? Alpha::LDT : Alpha::LDS;
|
||||||
BuildMI(BB, Opc, 2, Result).addImm(0).addReg(Tmp2);
|
BuildMI(BB, Opc, 2, Result).addImm(0).addReg(Tmp2);
|
||||||
}
|
}
|
||||||
return Result;
|
return Result;
|
||||||
|
|
@ -379,6 +382,8 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result)
|
||||||
if (ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N)) {
|
if (ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N)) {
|
||||||
if (CN->isExactlyValue(+0.0)) {
|
if (CN->isExactlyValue(+0.0)) {
|
||||||
BuildMI(BB, Alpha::CPYS, 2, Result).addReg(Alpha::F31).addReg(Alpha::F31);
|
BuildMI(BB, Alpha::CPYS, 2, Result).addReg(Alpha::F31).addReg(Alpha::F31);
|
||||||
|
} else if ( CN->isExactlyValue(-0.0)) {
|
||||||
|
BuildMI(BB, Alpha::CPYSN, 2, Result).addReg(Alpha::F31).addReg(Alpha::F31);
|
||||||
} else {
|
} else {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
@ -409,10 +414,10 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result)
|
||||||
|
|
||||||
Tmp2 = MakeReg(MVT::f32);
|
Tmp2 = MakeReg(MVT::f32);
|
||||||
|
|
||||||
if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(N.getOperand(1)))
|
assert(cast<MVTSDNode>(Node)->getExtraValueType() == MVT::f32 && "EXTLOAD not from f32");
|
||||||
if (Node->getValueType(0) == MVT::f64) {
|
assert(Node->getValueType(0) == MVT::f64 && "EXTLOAD not to f64");
|
||||||
assert(cast<MVTSDNode>(Node)->getExtraValueType() == MVT::f32 &&
|
|
||||||
"Bad EXTLOAD!");
|
if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(N.getOperand(1))) {
|
||||||
AlphaLowering.restoreGP(BB);
|
AlphaLowering.restoreGP(BB);
|
||||||
BuildMI(BB, Alpha::LDS_SYM, 1, Tmp2).addConstantPoolIndex(CP->getIndex());
|
BuildMI(BB, Alpha::LDS_SYM, 1, Tmp2).addConstantPoolIndex(CP->getIndex());
|
||||||
BuildMI(BB, Alpha::CVTST, 1, Result).addReg(Tmp2);
|
BuildMI(BB, Alpha::CVTST, 1, Result).addReg(Tmp2);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue