mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
eval, float: fix the __float80e__ and __float128h__ conversions
We need to add the byte offset into the floating-point value to get the correct result for these floating point to integer conversions. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
50200cc0d3
commit
7839766663
@ -727,7 +727,7 @@ static expr *eval_floatize(enum floatize type)
|
||||
len = fmt->bytes - fmt->offset;
|
||||
if (len > 8)
|
||||
len = 8; /* Max 64 bits */
|
||||
p = result + len;
|
||||
p = result + len + fmt->offset;
|
||||
val = 0;
|
||||
for (i = len; i; i--) {
|
||||
p--;
|
||||
|
@ -34,6 +34,9 @@ operation size (e.g. \c{movsd qword [eax],xmm0}).
|
||||
\b The \c{-L+} option no longer enables \c{-Lw}, which is mainly
|
||||
useful to debug NASM crashes. See \k{opt-L}.
|
||||
|
||||
\b Fix the \c{__float80e__} and \c{__float128h__} conversions, which
|
||||
would return the wrong bytes of the result.
|
||||
|
||||
\S{cl-2.15.03} Version 2.15.03
|
||||
|
||||
\b Add instructions from the Intel Instruction Set Extensions and
|
||||
|
Loading…
Reference in New Issue
Block a user