runtime: Add error message when running non GOAMD64=v1 on unsupported hardware #48506
With #45453 we are introducing GOAMD64 to build binaries that are not supported on all amd64 machines.
This can lead to an illegal instruction exception when running such a binary.
We should make best effort to report when such a binary with GOAMD64 > v1 is run on unsupported hardware.
One way to check is to add some assembly early in the runtime startup like it is done to detect MMX on 386 and print a short error message then exit the go program:
Waiting for internal/cpu to initialise to then do the minimum hardware checks in go code is likely to late as by that time an instruction that was emitted by the go compiler could have been used that already is unsupported.
The text was updated successfully, but these errors were encountered: