NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-mips/57680: printf("%.1f") shows wrong results on R3000mipseb



The following reply was made to PR port-mips/57680; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
Cc: gnats-bugs%netbsd.org@localhost, tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-mips/57680: printf("%.1f") shows wrong results on R3000mipseb
Date: Wed, 15 Nov 2023 18:10:54 +0000

 > Date: Thu, 16 Nov 2023 02:48:29 +0900
 > From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
 > 
 >  	lwc1	$f0,4($2)
 >  	lwc1	$f2,36($sp)
 >  	lwc1	$f1,0($2)
 >  	lwc1	$f3,32($sp)
 > -	#nop
 > +	nop
 >  	c.lt.d	$f2,$f0
 > ...
 >  	lwc1	$f8,%lo($LC9+4)($5)
 >  	#nop
 >  	lwc1	$f9,%lo($LC9)($5)
 > -	#nop
 > +	nop
 >  $L63:
 >  	mul.d	$f0,$f0,$f8
 > 
 > It looks both $f2/$f3 and $f8/$f9 FP register pairs are used as double,
 > so as(1) should handle more hazard such case (double that requires
 > two FP registers)?
 
 Yes, that sounds likely: lwc1 only loads one 32-bit quantity at a
 time, but c.lt.d and mul.d operate on two consecutive 32-bit registers
 to form a 64-bit double for each of their two input operands.
 
 Time to file a gas bug, I guess!
 


Home | Main Index | Thread Index | Old Index