SIGN IN SIGN UP

[dev.simd] simd, cmd/compile: add Midway GODEBUG=simd=0 emulation switch

This can be used for testing; also the same code paths
are used to disable SIMD if minimum features (e.g., CLMUL)
are missing.

Refactored the simd init code into something much more
sensible, since the behavior was starting to get a little
fiddly.

Refactored the emulation code, in general, in archsimd.
This was just moving code into appropriately named files,
no algorithmic changes at all.

Added HasVPCLMULQDQ to internal/cpu.X86 because the Intel
architecture says it matters to AVX2, not just AVX512,
and the amd64 emulation on Apple Silicon conforms to that
documentation.  Other VMs are more conservative, however
there is a DoWhatISay option (GODEBUG=simd=+) to override
if the user knows better.

Change-Id: I19757f2adec6c56bce7983f9eb879ec6dcdaf463
Reviewed-on: https://go-review.googlesource.com/c/go/+/785320
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Bypass: David Chase <drchase@google.com>
D
David Chase committed
a92cf0ee94d60b0952b100e0f6c2c665d63f6a00
Parent: e3afca4