* [Qemu-devel] [Bug 1843651] [NEW] m68k fpu bug
@ 2019-09-11 22:09 Pierre Muller
2019-09-12 18:32 ` [Qemu-devel] [Bug 1843651] " Alex Bennée
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Pierre Muller @ 2019-09-11 22:09 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
On gcc123 cfarm machine,
I was testing m68k executables generated by Free Pascal Compiler.
muller@gcc123:~/pas/check$ cat inf.pp
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(hexstr(py[i],2));
writeln;
y:=get_double(y)+1;
{$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(hexstr(py[i],2));
writeln;
end.
muller@gcc123:~/pas/check$ ppc68k inf
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@gcc123:~/pas/check$ ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ qemu-m68k ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k ./inf
qemu-m68k qemu-m68k-fixed
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k-fixed ./inf
big endian y=7FF0000000000000
big endian y=7FF0000000000000
~/sys-root/bin/qemu-m68k is 4.1.0 release,
~/sys-root/bin/qemu-m68k-fixed is the same source with a unique change:
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h:214:#if defined(TARGET_M68K)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-215-#define floatx80_infinity_low LIT64(0x0000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-216-#else
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-217-#define floatx80_infinity_low LIT64(0x8000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-218-#endif
the M68K branch value is set to the same value as the other branch.
The problem of the M68K specific floatx86_infinity_low values
is that is enters in conflict with
muller@gcc123:~/pas/check$ grep -nA6 invalid_enc /home/muller/gnu/qemu/qemu-4.1.0/include/fpu/softfloat.h
752:static inline bool floatx80_invalid_encoding(floatx80 a)
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
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1843651
Title:
m68k fpu bug
Status in QEMU:
New
Bug description:
On gcc123 cfarm machine,
I was testing m68k executables generated by Free Pascal Compiler.
muller@gcc123:~/pas/check$ cat inf.pp
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(hexstr(py[i],2));
writeln;
y:=get_double(y)+1;
{$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(hexstr(py[i],2));
writeln;
end.
muller@gcc123:~/pas/check$ ppc68k inf
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@gcc123:~/pas/check$ ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ qemu-m68k ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k ./inf
qemu-m68k qemu-m68k-fixed
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k-fixed ./inf
big endian y=7FF0000000000000
big endian y=7FF0000000000000
~/sys-root/bin/qemu-m68k is 4.1.0 release,
~/sys-root/bin/qemu-m68k-fixed is the same source with a unique change:
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h:214:#if defined(TARGET_M68K)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-215-#define floatx80_infinity_low LIT64(0x0000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-216-#else
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-217-#define floatx80_infinity_low LIT64(0x8000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-218-#endif
the M68K branch value is set to the same value as the other branch.
The problem of the M68K specific floatx86_infinity_low values
is that is enters in conflict with
muller@gcc123:~/pas/check$ grep -nA6 invalid_enc /home/muller/gnu/qemu/qemu-4.1.0/include/fpu/softfloat.h
752:static inline bool floatx80_invalid_encoding(floatx80 a)
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1843651/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [Bug 1843651] Re: m68k fpu bug
2019-09-11 22:09 [Qemu-devel] [Bug 1843651] [NEW] m68k fpu bug Pierre Muller
@ 2019-09-12 18:32 ` Alex Bennée
2021-04-22 7:32 ` Thomas Huth
2021-04-23 14:40 ` Pierre Muller
2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2019-09-12 18:32 UTC (permalink / raw)
To: qemu-devel
** Tags added: fpu m68k
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1843651
Title:
m68k fpu bug
Status in QEMU:
New
Bug description:
On gcc123 cfarm machine,
I was testing m68k executables generated by Free Pascal Compiler.
muller@gcc123:~/pas/check$ cat inf.pp
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(hexstr(py[i],2));
writeln;
y:=get_double(y)+1;
{$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(hexstr(py[i],2));
writeln;
end.
muller@gcc123:~/pas/check$ ppc68k inf
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@gcc123:~/pas/check$ ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ qemu-m68k ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k ./inf
qemu-m68k qemu-m68k-fixed
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k-fixed ./inf
big endian y=7FF0000000000000
big endian y=7FF0000000000000
~/sys-root/bin/qemu-m68k is 4.1.0 release,
~/sys-root/bin/qemu-m68k-fixed is the same source with a unique change:
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h:214:#if defined(TARGET_M68K)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-215-#define floatx80_infinity_low LIT64(0x0000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-216-#else
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-217-#define floatx80_infinity_low LIT64(0x8000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-218-#endif
the M68K branch value is set to the same value as the other branch.
The problem of the M68K specific floatx86_infinity_low values
is that is enters in conflict with
muller@gcc123:~/pas/check$ grep -nA6 invalid_enc /home/muller/gnu/qemu/qemu-4.1.0/include/fpu/softfloat.h
752:static inline bool floatx80_invalid_encoding(floatx80 a)
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1843651/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1843651] Re: m68k fpu bug
2019-09-11 22:09 [Qemu-devel] [Bug 1843651] [NEW] m68k fpu bug Pierre Muller
2019-09-12 18:32 ` [Qemu-devel] [Bug 1843651] " Alex Bennée
@ 2021-04-22 7:32 ` Thomas Huth
2021-04-23 14:40 ` Pierre Muller
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-04-22 7:32 UTC (permalink / raw)
To: qemu-devel
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.
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1843651
Title:
m68k fpu bug
Status in QEMU:
Incomplete
Bug description:
On gcc123 cfarm machine,
I was testing m68k executables generated by Free Pascal Compiler.
muller@gcc123:~/pas/check$ cat inf.pp
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(hexstr(py[i],2));
writeln;
y:=get_double(y)+1;
{$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(hexstr(py[i],2));
writeln;
end.
muller@gcc123:~/pas/check$ ppc68k inf
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@gcc123:~/pas/check$ ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ qemu-m68k ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k ./inf
qemu-m68k qemu-m68k-fixed
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k-fixed ./inf
big endian y=7FF0000000000000
big endian y=7FF0000000000000
~/sys-root/bin/qemu-m68k is 4.1.0 release,
~/sys-root/bin/qemu-m68k-fixed is the same source with a unique change:
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h:214:#if defined(TARGET_M68K)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-215-#define floatx80_infinity_low LIT64(0x0000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-216-#else
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-217-#define floatx80_infinity_low LIT64(0x8000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-218-#endif
the M68K branch value is set to the same value as the other branch.
The problem of the M68K specific floatx86_infinity_low values
is that is enters in conflict with
muller@gcc123:~/pas/check$ grep -nA6 invalid_enc /home/muller/gnu/qemu/qemu-4.1.0/include/fpu/softfloat.h
752:static inline bool floatx80_invalid_encoding(floatx80 a)
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1843651/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1843651] Re: m68k fpu bug
2019-09-11 22:09 [Qemu-devel] [Bug 1843651] [NEW] m68k fpu bug Pierre Muller
2019-09-12 18:32 ` [Qemu-devel] [Bug 1843651] " Alex Bennée
2021-04-22 7:32 ` Thomas Huth
@ 2021-04-23 14:40 ` Pierre Muller
2 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2021-04-23 14:40 UTC (permalink / raw)
To: qemu-devel
I tested, in release 5.2.0, this issue is fixed.
Thanks
** Changed in: qemu
Status: Incomplete => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1843651
Title:
m68k fpu bug
Status in QEMU:
Fix Released
Bug description:
On gcc123 cfarm machine,
I was testing m68k executables generated by Free Pascal Compiler.
muller@gcc123:~/pas/check$ cat inf.pp
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(hexstr(py[i],2));
writeln;
y:=get_double(y)+1;
{$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(hexstr(py[i],2));
writeln;
end.
muller@gcc123:~/pas/check$ ppc68k inf
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@gcc123:~/pas/check$ ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ qemu-m68k ./inf
big endian y=7FF0000000000000
big endian y=7FFFFFFFFFFFFFFF
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k ./inf
qemu-m68k qemu-m68k-fixed
muller@gcc123:~/pas/check$ ~/sys-root/bin/qemu-m68k-fixed ./inf
big endian y=7FF0000000000000
big endian y=7FF0000000000000
~/sys-root/bin/qemu-m68k is 4.1.0 release,
~/sys-root/bin/qemu-m68k-fixed is the same source with a unique change:
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h:214:#if defined(TARGET_M68K)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-215-#define floatx80_infinity_low LIT64(0x0000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-216-#else
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-217-#define floatx80_infinity_low LIT64(0x8000000000000000)
gnu/qemu/qemu-4.1.0/fpu/softfloat-specialize.h-218-#endif
the M68K branch value is set to the same value as the other branch.
The problem of the M68K specific floatx86_infinity_low values
is that is enters in conflict with
muller@gcc123:~/pas/check$ grep -nA6 invalid_enc /home/muller/gnu/qemu/qemu-4.1.0/include/fpu/softfloat.h
752:static inline bool floatx80_invalid_encoding(floatx80 a)
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1843651/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-23 14:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 22:09 [Qemu-devel] [Bug 1843651] [NEW] m68k fpu bug Pierre Muller
2019-09-12 18:32 ` [Qemu-devel] [Bug 1843651] " Alex Bennée
2021-04-22 7:32 ` Thomas Huth
2021-04-23 14:40 ` Pierre Muller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.