mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 15:41:10 +00:00
fpu/softfloat: Fix conversion from uint64 to float128
The significand is passed to normalizeRoundAndPackFloat128() as high first, low second. The current code passes the integer first, so the result is incorrectly shifted left by 64 bits. This bug affects the emulation of s390x instruction CXLGBR (convert from logical 64-bit binary-integer operand to extended BFP result). Backports commit 6603d50648901e8b9e6d66ec1142accf0b1df1e6 from qemu
This commit is contained in:
parent
5091ebe6fb
commit
d1d09f384e
|
@ -3148,7 +3148,7 @@ float128 uint64_to_float128(uint64_t a, float_status *status)
|
|||
float128 zero = {0};
|
||||
return zero;
|
||||
}
|
||||
return normalizeRoundAndPackFloat128(0, 0x406E, a, 0, status);
|
||||
return normalizeRoundAndPackFloat128(0, 0x406E, 0, a, status);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue