Revise previous patch per review comments.

Next round of x87 long double stuff.
Getting close now, basically works.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2007-09-12 03:30:33 +00:00
parent 257500db04
commit 9d5f456077
15 changed files with 162 additions and 89 deletions

View File

@@ -428,10 +428,10 @@ void MSILWriter::printConstLoad(const Constant* C) {
uint64_t X;
unsigned Size;
if (FP->getType()->getTypeID()==Type::FloatTyID) {
X = (uint32_t)*FP->getValueAPF().convertToAPInt().getRawData();
X = (uint32_t)FP->getValueAPF().convertToAPInt().getZExtValue();
Size = 4;
} else {
X = *FP->getValueAPF().convertToAPInt().getRawData();
X = FP->getValueAPF().convertToAPInt().getZExtValue();
Size = 8;
}
Out << "\tldc.r" << Size << "\t( " << utohexstr(X) << ')';
@@ -1473,10 +1473,10 @@ void MSILWriter::printStaticConstant(const Constant* C, uint64_t& Offset) {
const ConstantFP* FP = cast<ConstantFP>(C);
if (Ty->getTypeID() == Type::FloatTyID)
Out << "int32 (" <<
(uint32_t)*FP->getValueAPF().convertToAPInt().getRawData() << ')';
(uint32_t)FP->getValueAPF().convertToAPInt().getZExtValue() << ')';
else
Out << "int64 (" <<
*FP->getValueAPF().convertToAPInt().getRawData() << ')';
FP->getValueAPF().convertToAPInt().getZExtValue() << ')';
break;
}
case Type::ArrayTyID: