mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -498,9 +498,10 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
||||
else if (Op0->getType() == Type::X86_FP80Ty) {
|
||||
APFloat apf = APFloat(GV.IntVal);
|
||||
uint64_t v;
|
||||
bool ignored;
|
||||
(void)apf.convertToInteger(&v, BitWidth,
|
||||
CE->getOpcode()==Instruction::FPToSI,
|
||||
APFloat::rmTowardZero);
|
||||
APFloat::rmTowardZero, &ignored);
|
||||
GV.IntVal = v; // endian?
|
||||
}
|
||||
return GV;
|
||||
|
Reference in New Issue
Block a user