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 16:35:49 +0000

 > Date: Thu, 16 Nov 2023 00:18:16 +0900
 > From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
 > 
 > On the other hand, gas from binutils 2.16.1 in netbsd-5 seems to put
 > necessary(?) nop after lwc1 on assembling the same .s source:
 > ...
 >         :       c7a00024        lwc1    $f0,36(sp)
 >         :       c7a10020        lwc1    $f1,32(sp)
 > ===>    :       00000000        nop
 >         :       e7a0002c        swc1    $f0,44(sp)
 >         :       e7a10028        swc1    $f1,40(sp)
 
 Interesting.  Does this one nop make the difference?  If you assemble
 the .s file without it, and assemble the .s file with it added, does
 that make the difference of whether printf works correctly or not?
 
 If this nop does make the difference, that suggests to me that my
 interpretation of the CPU references we found was wrong -- that the
 load must be separated by _two_ instructions from any use of the
 register, not by just one.
 


Home | Main Index | Thread Index | Old Index