Repository: go
Issue: cmd/asm: panic assembling VGATHERDPD instruction
Labels: NeedsFix,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15.6 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes, it's present in `go1.16beta1` too.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/mbm/Library/Caches/go-build"
GOENV="/Users/mbm/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/mbm/Development/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/mbm/Development/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/mbm/Development/avo/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/cj/jl6w0c1j4sz5vs05h5l1cby40000gn/T/go-build260372576=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

Assembling the following code:

```s
TEXT ·test(SB), 0, $0
	VGATHERDPD	32(Y13*8), Z17
	RET
```

### What did you expect to see?

Assembler should produce an error.

### What did you see instead?

```
$ go tool asm panic.s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1189ec2]

goroutine 1 [running]:
cmd/internal/obj/x86.(*AsmBuf).doasm(0xc0000bfb90, 0xc00009c820, 0xc0000ce100, 0xc0000935f0)
	/usr/local/Cellar/go/1.15.6/libexec/src/cmd/internal/obj/x86/asm6.go:4235 +0x74e2
cmd/internal/obj/x86.(*AsmBuf).asmins(0xc0000bfb90, 0xc00009c820, 0xc0000ce100, 0xc0000935f0)
	/usr/local/Cellar/go/1.15.6/libexec/src/cmd/internal/obj/x86/asm6.go:5382 +0x65
cmd/internal/obj/x86.span6(0xc00009c820, 0xc0000ce100, 0xc00008e540)
	/usr/local/Cellar/go/1.15.6/libexec/src/cmd/internal/obj/x86/asm6.go:2154 +0x545
cmd/internal/obj.Flushplist(0xc00009c820, 0xc0000bfe30, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.6/libexec/src/cmd/internal/obj/plist.go:107 +0x762
main.main()
	/usr/local/Cellar/go/1.15.6/libexec/src/cmd/asm/main.go:91 +0x74b
```

I'm guessing this is an unsafe use of `p.GetFrom3()`:

https://github.com/golang/go/blob/4fd94558820100129b98f284e21b19fc27a99926/src/cmd/internal/obj/x86/asm6.go#L4231