Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: add support for compiling without the MMX requirement on GOARCH=386 #37056
What version of Go are you using (
As far as I remember the fundamental reason why MMX is needed is that otherwise there is no fast/easy way to atomically write 64bit with non-mmx instructions that are part of x86.
One can go through floating point load and stores but that requires making sure the floating point control has 64bit mantissas set. Im not sure go enforces/requires that.
One can use
In the era of P5 and P6 pentiums also the guarantees changed for aligned/unaligned 64bit load/store atomicity guarantees. P5 only supported atomicity on naturally aligned (64bit for 64bit int) load/stores. That however may not be an issue since I think all callers are required to use 64bit alignment already for runtime atomic.
More practical problems:
If its not implemented as an option it will likely slow down other x86 systems that have MMX.
Is the maintenance burden supporting an extra option (running builders, code maintenance) worth the potential usage for the use case. Maybe gcc-go, tinygo are already better since they can also optimize for the specific cpu?