mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Use fldz and fld1 for long double constants instead of a constant pool load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
84cd0e7fa3
commit
71d07a0dac
@ -455,7 +455,20 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
|
||||
addRegisterClass(MVT::f80, X86::RFP80RegisterClass);
|
||||
setOperationAction(ISD::UNDEF, MVT::f80, Expand);
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f80, Expand);
|
||||
{
|
||||
setOperationAction(ISD::ConstantFP, MVT::f80, Expand);
|
||||
APFloat TmpFlt(+0.0);
|
||||
TmpFlt.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven);
|
||||
addLegalFPImmediate(TmpFlt); // FLD0
|
||||
TmpFlt.changeSign();
|
||||
addLegalFPImmediate(TmpFlt); // FLD0/FCHS
|
||||
APFloat TmpFlt2(+1.0);
|
||||
TmpFlt2.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven);
|
||||
addLegalFPImmediate(TmpFlt2); // FLD1
|
||||
TmpFlt2.changeSign();
|
||||
addLegalFPImmediate(TmpFlt2); // FLD1/FCHS
|
||||
}
|
||||
|
||||
if (!UnsafeFPMath) {
|
||||
setOperationAction(ISD::FSIN , MVT::f80 , Expand);
|
||||
setOperationAction(ISD::FCOS , MVT::f80 , Expand);
|
||||
|
Loading…
Reference in New Issue
Block a user