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 resultsonR3000mipseb



On 2023/11/04 19:16, Izumi Tsutsui wrote:
   Unless some MIPS guru has proper idea how this issue should be fixed,
   I'd like to commit workaround fix to disable -DHonor_FLT_ROUNDS in
   src/lib/libc/gdtoa/Makefile.inc in ${MACHINE_CPU}=="mips" case.

(1) How about -current or netbsd-10, which have GCC 10.5?

      Less likely, but if this is a temporal problem for specific
      versions of GCC, we can restrict the workaround to netbsd-9.

I have not tried it, but last time I tried netbsd-10 kernel
on NWS-3260 it was very unstable and looked lost software interrupts
many times, so I'm currently testing NWS-3260 on netbsd-9.

Thanks, I understand the situation :(

I doubt this problem was really compiler issue and
I wonder if it's okay to assume "FE_TONEAREST" is default
because FE_TOZERO works.

(2) Can we exclude ``mipsn{,64}e[bl]''? -current and netbsd-10 have
      ${MACHINE_MIPS64} macro for this purpose, but netbsd-9 does not :(

What's your motivation?

Performance? If so, is it visible or measurable?
Consistency? If so, is there any rationale of Honor_FLT_ROUNDS
implementation?  Actually we already have an exception (vax).

If you have a working patch to achive your intention in both
HEAD and release branches, it's fine.  If not, sorry I don't
have motivation to prepare such complexities.

I'm trying to fix visible issue (and real problems like invalid
strings stored in /etc/ntp.conf etc.).  If you want possible
performace or design consistency, it should be measured or
defined by people who want it, because we are on Tier-II ports
"keeping it working is the responsibility of the user community."
  https://wiki.netbsd.org/ports/

I'm worried about consistency.

IMO, it is less surprising that vax is treated differently here;
it does not comply IEEE 754, and no working fenv implementation
at the moment.

This patch is working both for -current/netbsd-10 and netbsd-9:

https://www.netbsd.org/~rin/gdtoa_port-mips_57680.patch

Thanks,
rin


Home | Main Index | Thread Index | Old Index