Subject: pkg/34571: TME sun3 emulator doesn't consider floating point infinities to be equal
To: None <email@example.com, firstname.lastname@example.org,>
From: None <email@example.com>
Date: 09/20/2006 17:05:00
>Synopsis: TME sun3 emulator doesn't consider floating point infinities to be equal
>Arrival-Date: Wed Sep 20 17:05:00 +0000 2006
>Originator: Arthur Townsend
3.0 for i386
TME doesn't consider extended floating point infinities to be equal (whereas a real sun3 does).
gcc-3.3.3 testcase 960405-1.c, compiled with hard float on a real sun3 passes. compiled with hard float inside the emulator, it fails. compiled with -msoft-float on either a real sun3 or inside TME it fails. This is likely a softfloat implementation, as both -msoft-float and TME's emulation of hardware floating point use the same softfloat routines.
The assembly code below (modified from the output of gcc -S 960405-1.c) clearly shows comparing infinity to itself.
.type x, @object
.size x, 12
.type main, @function
.size main, .-main
.ident "GCC: (GNU) 3.3.3 (NetBSD nb3 20040520)"
Also note that a real sun3 considers
0x7fff00008000000000000000 infinity the same as
Modify TME's softfloat routines. Arguably, its not a problem with the original softfloat routines themselves, since different operating systems and processors may implement infinity comparisons differently, but since TME is designed to emulate a Sun3, then it should do exactly what a Sun3 does, and consider infinities equal.