mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-24 08:18:33 +00:00
Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet, just format transformations. Make readers and writers work. Split constants into 2 doubles in Legalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -5196,6 +5196,14 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
}
|
||||
case ISD::ConstantFP: {
|
||||
ConstantFPSDNode *CFP = cast<ConstantFPSDNode>(Node);
|
||||
if (CFP->getValueType(0) == MVT::ppcf128) {
|
||||
APInt api = CFP->getValueAPF().convertToAPInt();
|
||||
Lo = DAG.getConstantFP(APFloat(APInt(64, 1, &api.getRawData()[1])),
|
||||
MVT::f64);
|
||||
Hi = DAG.getConstantFP(APFloat(APInt(64, 1, &api.getRawData()[0])),
|
||||
MVT::f64);
|
||||
break;
|
||||
}
|
||||
Lo = ExpandConstantFP(CFP, false, DAG, TLI);
|
||||
if (getTypeAction(Lo.getValueType()) == Expand)
|
||||
ExpandOp(Lo, Lo, Hi);
|
||||
|
||||
Reference in New Issue
Block a user