mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32495 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
004952140f
commit
5c9ce1893a
@ -4903,6 +4903,9 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
case ISD::SREM: Lo = ExpandLibCall("__moddi3" , Node, Hi); break;
|
||||
case ISD::UREM: Lo = ExpandLibCall("__umoddi3", Node, Hi); break;
|
||||
|
||||
case ISD::FNEG:
|
||||
Lo = ExpandLibCall(((VT == MVT::f32) ? "__negsf2" : "__negdf2"), Node, Hi);
|
||||
break;
|
||||
case ISD::FADD:
|
||||
Lo = ExpandLibCall(((VT == MVT::f32) ? "__addsf3" : "__adddf3"), Node, Hi);
|
||||
break;
|
||||
@ -4921,6 +4924,22 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
case ISD::FP_ROUND:
|
||||
Lo = ExpandLibCall("__truncdfsf2", Node, Hi);
|
||||
break;
|
||||
case ISD::SINT_TO_FP:
|
||||
if (Node->getOperand(0).getValueType() == MVT::i64)
|
||||
Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatdisf" : "__floatdidf"),
|
||||
Node, Hi);
|
||||
else
|
||||
Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatsisf" : "__floatsidf"),
|
||||
Node, Hi);
|
||||
break;
|
||||
case ISD::UINT_TO_FP:
|
||||
if (Node->getOperand(0).getValueType() == MVT::i64)
|
||||
Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatundisf" : "__floatundidf"),
|
||||
Node, Hi);
|
||||
else
|
||||
Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatunsisf" : "__floatunsidf"),
|
||||
Node, Hi);
|
||||
break;
|
||||
}
|
||||
|
||||
// Make sure the resultant values have been legalized themselves, unless this
|
||||
|
Loading…
Reference in New Issue
Block a user