mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
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:
@ -526,11 +526,8 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
} else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
|
||||
Code = bitc::CST_CODE_FLOAT;
|
||||
const Type *Ty = CFP->getType();
|
||||
if (Ty == Type::FloatTy)
|
||||
Record.push_back((uint32_t)*CFP->getValueAPF().convertToAPInt().
|
||||
getRawData());
|
||||
else if (Ty == Type::DoubleTy) {
|
||||
Record.push_back(*CFP->getValueAPF().convertToAPInt().getRawData());
|
||||
if (Ty == Type::FloatTy || Ty == Type::DoubleTy) {
|
||||
Record.push_back(CFP->getValueAPF().convertToAPInt().getZExtValue());
|
||||
} else if (Ty == Type::X86_FP80Ty) {
|
||||
const uint64_t *p = CFP->getValueAPF().convertToAPInt().getRawData();
|
||||
Record.push_back(p[0]);
|
||||
|
Reference in New Issue
Block a user