qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
@ 2007-11-18 14:33 Paul Brook
  2007-11-20 20:17 ` Blue Swirl
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Brook @ 2007-11-18 14:33 UTC (permalink / raw)
  To: qemu-devel

CVSROOT:	/sources/qemu
Module name:	qemu
Changes by:	Paul Brook <pbrook>	07/11/18 14:33:24

Modified files:
	fpu            : softfloat-specialize.h softfloat.c softfloat.h 
	target-arm/nwfpe: double_cpdo.c single_cpdo.c 
	target-m68k    : helper.c op.c 
	target-mips    : op_helper.c 

Log message:
	Add strict checking mode for softfp code.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/fpu/softfloat-specialize.h?cvsroot=qemu&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/qemu/fpu/softfloat.c?cvsroot=qemu&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemu/fpu/softfloat.h?cvsroot=qemu&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/qemu/target-arm/nwfpe/double_cpdo.c?cvsroot=qemu&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/qemu/target-arm/nwfpe/single_cpdo.c?cvsroot=qemu&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/helper.c?cvsroot=qemu&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/op.c?cvsroot=qemu&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/op_helper.c?cvsroot=qemu&r1=1.73&r2=1.74

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-18 14:33 [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c Paul Brook
@ 2007-11-20 20:17 ` Blue Swirl
  2007-11-20 20:42   ` Paul Brook
  2007-11-21  8:51   ` Aurelien Jarno
  0 siblings, 2 replies; 10+ messages in thread
From: Blue Swirl @ 2007-11-20 20:17 UTC (permalink / raw)
  To: qemu-devel, paul

On 11/18/07, Paul Brook <paul@nowt.org> wrote:
> CVSROOT:        /sources/qemu
> Module name:    qemu
> Changes by:     Paul Brook <pbrook>     07/11/18 14:33:24
>
> Modified files:
>         fpu            : softfloat-specialize.h softfloat.c softfloat.h
>         target-arm/nwfpe: double_cpdo.c single_cpdo.c
>         target-m68k    : helper.c op.c
>         target-mips    : op_helper.c
>
> Log message:
>         Add strict checking mode for softfp code.

This commit has broken sparc-softmmu, for example Aurora 1.0 normally prints:
Running anaconda - please wait...
Probing for video card:   Sun TCX (8bit)
Probing for monitor type: Unable to probe
Probing for mouse type:   Sun - Mouse

After this commit:
Running anaconda - please wait...
Traceback (innermost last):
  File "/usr/bin/anaconda", line 67, in ?
    import dispatch
  File "/usr/lib/anaconda/dispatch.py", line 29, in ?
    from bootloader import writeBootloader, bootloaderSetupChoices
  File "/usr/lib/anaconda/bootloader.py", line 21, in ?
    import whrandom
  File "/usr/lib/python1.5/whrandom.py", line 140, in ?
    _inst = whrandom()
  File "/usr/lib/python1.5/whrandom.py", line 46, in __init__
    self.seed(x, y, z)
  File "/usr/lib/python1.5/whrandom.py", line 59, in seed
    t = long(time.time() * 256)
IOError: [Errno 2] No such file or directory
install exited abnormally
sending termination signals...done
sending kill signals...done
disabling swap...
unmounting filesystems...
        /mnt/runtime done
        disabling /dev/loop0
        /proc/openprom done
        /proc done
        /dev/pts done
        /mnt/source done
ejecting /tmp/cdrom...
you may safely reboot your system


This and a couple similar changes look suspicious:
                   && ( (sbits64) ( zSig + roundIncrement ) < 0 ) )
            ) {
             float_raise( float_flag_overflow | float_flag_inexact STATUS_VAR);
-            return packFloat64( zSign, 0x7FF, 0 ) - ( roundIncrement == 0 );
+            return packFloat64( zSign, 0x7FF, - ( roundIncrement == 0 ));
         }
         if ( zExp < 0 ) {
             isTiny =

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-20 20:17 ` Blue Swirl
@ 2007-11-20 20:42   ` Paul Brook
  2007-11-21  8:51   ` Aurelien Jarno
  1 sibling, 0 replies; 10+ messages in thread
From: Paul Brook @ 2007-11-20 20:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

> > Log message:
> >         Add strict checking mode for softfp code.
>
> This commit has broken sparc-softmmu,

Strange. My intention was for this commit to have absolutely no functional 
changes.

FWIW I verified that the debian-sparc installer image booted successfully. I 
guess this probably doesn't stress the FPU much though.

> This and a couple similar changes look suspicious:
>            && ( (sbits64) ( zSig + roundIncrement ) < 0 ) )
>     ) {
>      float_raise( float_flag_overflow | float_flag_inexact STATUS_VAR);
> -    return packFloat64( zSign, 0x7FF, 0 ) - ( roundIncrement == 0 );
> +    return packFloat64( zSign, 0x7FF, - ( roundIncrement == 0 )); }

I'm pretty sure this change is correct. ie. it has no effect on the result.

Paul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-20 20:17 ` Blue Swirl
  2007-11-20 20:42   ` Paul Brook
@ 2007-11-21  8:51   ` Aurelien Jarno
  2007-11-21 10:40     ` Aurelien Jarno
  1 sibling, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2007-11-21  8:51 UTC (permalink / raw)
  To: qemu-devel

Blue Swirl a écrit :
> On 11/18/07, Paul Brook <paul@nowt.org> wrote:
>> CVSROOT:        /sources/qemu
>> Module name:    qemu
>> Changes by:     Paul Brook <pbrook>     07/11/18 14:33:24
>>
>> Modified files:
>>         fpu            : softfloat-specialize.h softfloat.c softfloat.h
>>         target-arm/nwfpe: double_cpdo.c single_cpdo.c
>>         target-m68k    : helper.c op.c
>>         target-mips    : op_helper.c
>>
>> Log message:
>>         Add strict checking mode for softfp code.
> 
> This commit has broken sparc-softmmu, for example Aurora 1.0 normally prints:
> Running anaconda - please wait...

There are also FPU regressions for mips-softmmu, but I haven't found
time to find the commit that has broken it, I just know it has been
broken over the week-end.

More later...

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-21  8:51   ` Aurelien Jarno
@ 2007-11-21 10:40     ` Aurelien Jarno
  2007-11-21 15:10       ` Aurelien Jarno
  0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2007-11-21 10:40 UTC (permalink / raw)
  To: qemu-devel

Aurelien Jarno a écrit :
> Blue Swirl a écrit :
>> On 11/18/07, Paul Brook <paul@nowt.org> wrote:
>>> CVSROOT:        /sources/qemu
>>> Module name:    qemu
>>> Changes by:     Paul Brook <pbrook>     07/11/18 14:33:24
>>>
>>> Modified files:
>>>         fpu            : softfloat-specialize.h softfloat.c softfloat.h
>>>         target-arm/nwfpe: double_cpdo.c single_cpdo.c
>>>         target-m68k    : helper.c op.c
>>>         target-mips    : op_helper.c
>>>
>>> Log message:
>>>         Add strict checking mode for softfp code.
>> This commit has broken sparc-softmmu, for example Aurora 1.0 normally prints:
>> Running anaconda - please wait...
> 
> There are also FPU regressions for mips-softmmu, but I haven't found
> time to find the commit that has broken it, I just know it has been
> broken over the week-end.
> 
> More later...

I am now able to confirm this very same commit has also broken the FPU
on mips-softmmu, but I still don't know what is wrong in this commit.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-21 10:40     ` Aurelien Jarno
@ 2007-11-21 15:10       ` Aurelien Jarno
  2007-11-21 15:32         ` Paul Brook
  0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2007-11-21 15:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: paul

On Wed, Nov 21, 2007 at 11:40:13AM +0100, Aurelien Jarno wrote:
> Aurelien Jarno a écrit :
> > Blue Swirl a écrit :
> >> On 11/18/07, Paul Brook <paul@nowt.org> wrote:
> >>> CVSROOT:        /sources/qemu
> >>> Module name:    qemu
> >>> Changes by:     Paul Brook <pbrook>     07/11/18 14:33:24
> >>>
> >>> Modified files:
> >>>         fpu            : softfloat-specialize.h softfloat.c softfloat.h
> >>>         target-arm/nwfpe: double_cpdo.c single_cpdo.c
> >>>         target-m68k    : helper.c op.c
> >>>         target-mips    : op_helper.c
> >>>
> >>> Log message:
> >>>         Add strict checking mode for softfp code.
> >> This commit has broken sparc-softmmu, for example Aurora 1.0 normally prints:
> >> Running anaconda - please wait...
> > 
> > There are also FPU regressions for mips-softmmu, but I haven't found
> > time to find the commit that has broken it, I just know it has been
> > broken over the week-end.
> > 
> > More later...
> 
> I am now able to confirm this very same commit has also broken the FPU
> on mips-softmmu, but I still don't know what is wrong in this commit.
> 

Ok the problem comes from bad copy&paste. Please find a patch below that
fixes the problem on MIPS.

Index: fpu/softfloat.c
===================================================================
RCS file: /sources/qemu/qemu/fpu/softfloat.c,v
retrieving revision 1.8
diff -u -d -p -r1.8 softfloat.c
--- fpu/softfloat.c	18 Nov 2007 14:33:23 -0000	1.8
+++ fpu/softfloat.c	21 Nov 2007 15:06:19 -0000
@@ -3012,7 +3012,7 @@ int float64_eq( float64 a, float64 b STA
         return 0;
     }
     av = float64_val(a);
-    bv = float64_val(a);
+    bv = float64_val(b);
     return ( av == bv ) || ( (bits64) ( ( av | bv )<<1 ) == 0 );
 
 }
@@ -3038,7 +3038,7 @@ int float64_le( float64 a, float64 b STA
     aSign = extractFloat64Sign( a );
     bSign = extractFloat64Sign( b );
     av = float64_val(a);
-    bv = float64_val(a);
+    bv = float64_val(b);
     if ( aSign != bSign ) return aSign || ( (bits64) ( ( av | bv )<<1 ) == 0 );
     return ( av == bv ) || ( aSign ^ ( av < bv ) );
 
@@ -3064,7 +3064,7 @@ int float64_lt( float64 a, float64 b STA
     aSign = extractFloat64Sign( a );
     bSign = extractFloat64Sign( b );
     av = float64_val(a);
-    bv = float64_val(a);
+    bv = float64_val(b);
     if ( aSign != bSign ) return aSign && ( (bits64) ( ( av | bv )<<1 ) != 0 );
     return ( av != bv ) && ( aSign ^ ( av < bv ) );
 
@@ -3088,7 +3088,7 @@ int float64_eq_signaling( float64 a, flo
         return 0;
     }
     av = float64_val(a);
-    bv = float64_val(a);
+    bv = float64_val(b);
     return ( av == bv ) || ( (bits64) ( ( av | bv )<<1 ) == 0 );
 
 }
@@ -3116,7 +3116,7 @@ int float64_le_quiet( float64 a, float64
     aSign = extractFloat64Sign( a );
     bSign = extractFloat64Sign( b );
     av = float64_val(a);
-    bv = float64_val(a);
+    bv = float64_val(b);
     if ( aSign != bSign ) return aSign || ( (bits64) ( ( av | bv )<<1 ) == 0 );
     return ( av == bv ) || ( aSign ^ ( av < bv ) );
 
@@ -3145,7 +3145,7 @@ int float64_lt_quiet( float64 a, float64
     aSign = extractFloat64Sign( a );
     bSign = extractFloat64Sign( b );
     av = float64_val(a);
-    bv = float64_val(a);
+    bv = float64_val(b);
     if ( aSign != bSign ) return aSign && ( (bits64) ( ( av | bv )<<1 ) != 0 );
     return ( av != bv ) && ( aSign ^ ( av < bv ) );
 

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-21 15:10       ` Aurelien Jarno
@ 2007-11-21 15:32         ` Paul Brook
  2007-11-21 15:55           ` Eduardo Felipe
  2007-11-22  0:48           ` Thiemo Seufer
  0 siblings, 2 replies; 10+ messages in thread
From: Paul Brook @ 2007-11-21 15:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aurelien Jarno

> Ok the problem comes from bad copy&paste. Please find a patch below that
> fixes the problem on MIPS.
>
>      av = float64_val(a);
> -    bv = float64_val(a);
> +    bv = float64_val(b);

Applied, thanks for tracking this down. Sorry about the breakage.

Paul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-21 15:32         ` Paul Brook
@ 2007-11-21 15:55           ` Eduardo Felipe
  2007-11-21 18:58             ` Blue Swirl
  2007-11-22  0:48           ` Thiemo Seufer
  1 sibling, 1 reply; 10+ messages in thread
From: Eduardo Felipe @ 2007-11-21 15:55 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

2007/11/21, Paul Brook <paul@nowt.org>:
>
> > Ok the problem comes from bad copy&paste. Please find a patch below that
> > fixes the problem on MIPS.
> >
> >      av = float64_val(a);
> > -    bv = float64_val(a);
> > +    bv = float64_val(b);
>
> Applied, thanks for tracking this down. Sorry about the breakage.
>
> Paul
>
>
>

Hi,

Shouldn't these lines in COMPARE be fixed also?

    av = float ## s ## _val(a);
\
    bv = float ## s ## _val(a);
\

Regards,
Edu

[-- Attachment #2: Type: text/html, Size: 1419 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-21 15:55           ` Eduardo Felipe
@ 2007-11-21 18:58             ` Blue Swirl
  0 siblings, 0 replies; 10+ messages in thread
From: Blue Swirl @ 2007-11-21 18:58 UTC (permalink / raw)
  To: qemu-devel

On 11/21/07, Eduardo Felipe <edusaper@gmail.com> wrote:
>
>
> 2007/11/21, Paul Brook <paul@nowt.org>:
> > > Ok the problem comes from bad copy&paste. Please find a patch below that
> > > fixes the problem on MIPS.
> > >
> > >      av = float64_val(a);
> > > -    bv = float64_val(a);
> > > +    bv = float64_val(b);
> >
> > Applied, thanks for tracking this down. Sorry about the breakage.
> >
> > Paul
> >
> >
> >
>
>
> Hi,
>
>  Shouldn't these lines in COMPARE be fixed also?
>
>      av = float ## s ## _val(a);
>                   \
>      bv = float ## s ## _val(a);
>                   \
>
>  Regards,
>  Edu

Thanks, this fixes the Sparc boot FPU problem.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c...
  2007-11-21 15:32         ` Paul Brook
  2007-11-21 15:55           ` Eduardo Felipe
@ 2007-11-22  0:48           ` Thiemo Seufer
  1 sibling, 0 replies; 10+ messages in thread
From: Thiemo Seufer @ 2007-11-22  0:48 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel, Aurelien Jarno

Paul Brook wrote:
> > Ok the problem comes from bad copy&paste. Please find a patch below that
> > fixes the problem on MIPS.
> >
> >      av = float64_val(a);
> > -    bv = float64_val(a);
> > +    bv = float64_val(b);
> 
> Applied, thanks for tracking this down. Sorry about the breakage.

I saw the FP breakage as well and can confirm it now works again.


Thanks,
Thiemo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-11-22  0:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18 14:33 [Qemu-devel] qemu fpu/softfloat-specialize.h fpu/softfloat.c Paul Brook
2007-11-20 20:17 ` Blue Swirl
2007-11-20 20:42   ` Paul Brook
2007-11-21  8:51   ` Aurelien Jarno
2007-11-21 10:40     ` Aurelien Jarno
2007-11-21 15:10       ` Aurelien Jarno
2007-11-21 15:32         ` Paul Brook
2007-11-21 15:55           ` Eduardo Felipe
2007-11-21 18:58             ` Blue Swirl
2007-11-22  0:48           ` Thiemo Seufer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).