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: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-mips/57680: printf("%.1f") shows wrong results on
R3000mipseb
Date: Fri, 3 Nov 2023 12:49:55 +0000 (UTC)
On Fri, 3 Nov 2023, Izumi Tsutsui wrote:
> Now I've tried it on both NWS-3470 (R3000 + R3010) and NWS-5000 (R4400):
>
> On NWS-3470:
> ---
> news3470-% cc -I/s/netbsd-9/src/lib/libc/gdtoa/ -I/s/netbsd-9/src/lib/libc/arch/mips/gdtoa/ -DDEBUG -DHonor_FLT_ROUNDS -DNO_LONG_LONG -o m m.c /s/netbsd-9/src/lib/libc/gdtoa/gdtoa.c /s/netbsd-9/src/lib/libc/gdtoa/dmisc.c
> news3470-% ./m
> .O
> 40490FD0
> 3.0
> 439D145A
> ?.0
> 44C45970
> news3470-% grep ^cpu0 /var/run/dmesg.boot
> cpu0 at mainbus0: MIPS R3000 CPU (0x220) Rev. 2.0 with MIPS R3010 FPC Rev. 2.0
> cpu0: 64KB/4B direct-mapped Instruction cache, 64 TLB entries
> cpu0: 64KB/4B direct-mapped write-through Data cache
> news3470-%
> ---
>
> On NWS-5000:
> ---
> (copy the above "m" binary from NWS-3470)
> news5000-% ./m
> 3.1
> 40490FD0
> 314.1
> 439D145A
> 1570.7
> 44C45970
> news5000-% % grep ^cpu0 /var/run/dmesg.boot
> cpu0 at mainbus0: MIPS R4400 CPU (0x450) Rev. 5.0 with MIPS R4010 FPC Rev. 0.0
> cpu0: 48 TLB entries, 16MB max page size
> cpu0: 16KB/16B direct-mapped L1 instruction cache
> cpu0: 16KB/16B direct-mapped write-back L1 data cache
> cpu0: 1024KB/64B direct-mapped write-back L2 unified cache
> news5000-%
>
> ---
> Izumi Tsutsui
>
Interesting. The _same_ binary behaves differently. Rules out a compiler bug
--well, almost.
Can you try a new binary with /usr/src/lib/libc/gdtoa/misc.c compiled in as
well:
cc -I/usr/src/lib/libc/gdtoa/ -I/usr/src/lib/libc/arch/mips/gdtoa/ \
-DDEBUG -DHonor_FLT_ROUNDS -DNO_LONG_LONG -o m m.c \
/usr/src/lib/libc/gdtoa/dtoa.c \
/usr/src/lib/libc/gdtoa/dmisc.c \
/usr/src/lib/libc/gdtoa/misc.c
This way, the resulting binary won't pickup _any_ gdtoa funcs. from libc.
(Previously, the stuff in misc.c came from the libc on the running machine
which may have been optimized.)
-RVP
Home |
Main Index |
Thread Index |
Old Index