mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Patch 10 for long double. Doing constants right needs expanding ConstantFP
to handle values bigger than double. If we assume host==target and host long double works correctly, this is not too bad, but we don't want to have that limitation longterm. I could implement accepting double constants as long double or something like that, which would lead to incorrect codegen with no errors; the more I think about that the worse it seems. Rather than do such a hack that would be backed out later, I'm settling for giving reasonable error messages, for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -629,6 +629,10 @@ bool BitcodeReader::ParseConstants() {
|
||||
V = ConstantFP::get(CurTy, BitsToFloat(Record[0]));
|
||||
else if (CurTy == Type::DoubleTy)
|
||||
V = ConstantFP::get(CurTy, BitsToDouble(Record[0]));
|
||||
// FIXME: Make long double constants work.
|
||||
else if (CurTy == Type::X86_FP80Ty ||
|
||||
CurTy == Type::FP128Ty || CurTy == Type::PPC_FP128Ty)
|
||||
assert(0 && "Long double constants not handled yet.");
|
||||
else
|
||||
V = UndefValue::get(CurTy);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user