tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Softfloat on i386
> Date: Wed, 31 Dec 2025 18:10:42 +0000 (UTC)
> From: Benny Siegert <bsiegert%netbsd.org@localhost>
>
> In PR 59871, the submitter is asking for all Go on i386 to be switched to
> softfloat, so that the resulting binaries run in a 486.
>
> Is that a reasonable request? Are pkgsrc binary packages supposed to run
> on 486 processors?
In principle, that is a reasonable request: any optimizations that
rely on newer CPU features should have runtime conditionals to check
for the CPU features before using them, and should have a fallback
that does not rely on them.
For `NetBSD/i386' (which for a long time has really been i486DX -- the
x87 floating-point unit has been mandatory for over a decade, though I
did hear of someone working to revive optional x87 support for i386 or
i486SX CPUs in the last year or so with kernel softfloat), that means
x87 floating-point can be assumed but MMX/SSE/SSE2 requires runtime
conditionals.
In practice, well... This only affects hardware that is >>20 years
old, and there's likely to be a hefty performance impact on anyone
using <20-year-old 32-bit CPUs (of which there are plenty, or 64-bit
CPUs in a 32-bit userland). How do we weigh these against each other?
Maybe it's not a big performance impact because the Go world doesn't
tend to be heavy on numerical analysis, so maybe softfloat by default
for i386 is fine. But we should measure the impact, anyway.
> Or should it be an option?
I think that would be a good start. Likely also useful for other
architectures like mips, if they were ever to happen, where a lot more
CPUs were shipped in the real world without FPUs, like the erlite3.
Home |
Main Index |
Thread Index |
Old Index