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: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: riastradh%NetBSD.org@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: Thu, 16 Nov 2023 00:18:16 +0900

 I wrote:
 > However, IIUC if ".set reorder" is specified in as sources,
 > gas(1) should have responsibilities to insert necessary nops
 > to avoid hazards?
 
 As I wrote before gas from binutils 2.31.1 in netbsd-9 doesn't
 put any nop after lwc1 on assembling .s source by --save-temps:
 ---
         :       3c027ff0        lui     v0,0x7ff0
         :       02022024        and     a0,s0,v0
         :       108200cb        beq     a0,v0,3d0 <__dtoa+0x3d0>
         :       ac600000        sw      zero,0(v1)
         :       c7a00024        lwc1    $f0,36(sp)
         :       c7a10020        lwc1    $f1,32(sp)
         :       e7a0002c        swc1    $f0,44(sp)
         :       e7a10028        swc1    $f1,40(sp)
         :       c7a2002c        lwc1    $f2,44(sp)
         :       44800000        mtc1    zero,$f0
         :       c7a30028        lwc1    $f3,40(sp)
         :       44800800        mtc1    zero,$f1
         :       00000000        nop
         :       46201032        c.eq.d  $f2,$f0
         :       00000000        nop
         :       45010120        bc1t    558 <__dtoa+0x558>
 ---
 
 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:
 ---
         :       3c027ff0        lui     v0,0x7ff0
         :       02022024        and     a0,s0,v0
         :       108200ce        beq     a0,v0,3dc <__dtoa+0x3dc>
         :       ac600000        sw      zero,0(v1)
         :       c7a00024        lwc1    $f0,36(sp)
         :       c7a10020        lwc1    $f1,32(sp)
 ===>    :       00000000        nop
         :       e7a0002c        swc1    $f0,44(sp)
         :       e7a10028        swc1    $f1,40(sp)
         :       c7a2002c        lwc1    $f2,44(sp)
         :       44800000        mtc1    zero,$f0
         :       c7a30028        lwc1    $f3,40(sp)
         :       44800800        mtc1    zero,$f1
         :       00000000        nop
         :       46201032        c.eq.d  $f2,$f0
         :       00000000        nop
         :       45010123        bc1t    568 <__dtoa+0x568>
 ---
 
 ---
 Izumi Tsutsui
 


Home | Main Index | Thread Index | Old Index