m68k fpu bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On gcc123 cfarm machine,
I was testing m68k executables generated by Free Pascal Compiler.
muller@
function get_double(x : double):double;
begin
get_double:=x;
end;
var
y : double;
py : pbyte;
i : byte;
begin
y:=1.0/0.0;
py:=@y;
{$ifdef ENDIAN_LITTLE}
write('little endian y=');
for i:=7 downto 0 do
{$else not ENDIAN_LITTLE}
write('big endian y=');
for i:=0 to 7 do
{$endif}
write(
writeln;
y:=get_
{$ifdef ENDIAN_LITTLE}
write('little endian y=');
for i:=7 downto 0 do
{$else not ENDIAN_LITTLE}
write('big endian y=');
for i:=0 to 7 do
{$endif}
write(
writeln;
end.
muller@
Free Pascal Compiler version 3.3.1-r20:42973M [2019/09/11] for m68k
Copyright (c) 1993-2019 by Florian Klaempfl and others
Target OS: Linux for m68k
Compiling inf.pp
Assembling program
Linking inf
33 lines compiled, 0.1 sec
muller@
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@
qemu-m68k qemu-m68k-fixed
muller@
big endian y=7FF0000000000000
big endian y=7FF0000000000000
~/sys-root/
~/sys-root/
gnu/qemu/
gnu/qemu/
gnu/qemu/
gnu/qemu/
gnu/qemu/
the M68K branch value is set to the same value as the other branch.
The problem of the M68K specific floatx86_
is that is enters in conflict with
muller@
752:static inline bool floatx80_
753-{
754- return (a.low & (1ULL << 63)) == 0 && (a.high & 0x7FFF) != 0;
755-}
And thus the m68k variant of floatx80 representing +Infinity is
considered as an invalid encoding, and thus converted into a NaN 7FFFFFFFFFFFFFFF
tags: | added: fpu m68k |
The QEMU project is currently considering to move its bug tracking to
another system. For this we need to know which bugs are still valid
and which could be closed already. Thus we are setting older bugs to
"Incomplete" now.
If you still think this bug report here is valid, then please switch
the state back to "New" within the next 60 days, otherwise this report
will be marked as "Expired". Or please mark it as "Fix Released" if
the problem has been solved with a newer version of QEMU already.
Thank you and sorry for the inconvenience.