mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-14 19:03:14 +01:00
Fixed a bug in gen/tollvm.cpp.
This commit is contained in:
committed by
David Nadlinger
parent
5216fa48d8
commit
3d108ee684
@@ -596,7 +596,7 @@ LLConstant* DtoConstFP(Type* t, longdouble value)
|
||||
else if(llty == LLType::getX86_FP80Ty(gIR->context())) {
|
||||
uint64_t bits[] = {0, 0};
|
||||
bits[0] = *reinterpret_cast<uint64_t*>(&value);
|
||||
bits[1] = *reinterpret_cast<uint16_t*>(reinterpret_cast<uint64_t*>(&value + 1));
|
||||
bits[1] = *reinterpret_cast<uint16_t*>(reinterpret_cast<uint64_t*>(&value) + 1);
|
||||
return LLConstantFP::get(gIR->context(), APFloat(APInt(80, 2, bits)));
|
||||
} else {
|
||||
assert(0 && "Unknown floating point type encountered");
|
||||
|
||||
Reference in New Issue
Block a user