]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: make x86's asmbuf a local variable
authorJosh Bleecher Snyder <josharian@gmail.com>
Sat, 25 Mar 2017 17:44:21 +0000 (10:44 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sun, 26 Mar 2017 04:12:26 +0000 (04:12 +0000)
commit2ebe1bdd894a4bbd71408ae5c49d906f52320d2e
treedfb2c214010481311f631b3c06208d774a66ac0e
parent3b251e603d09739d466ff2f44c5a362e1ba5c0b1
cmd/internal/obj: make x86's asmbuf a local variable

The x86 assembler requires a buffer to build
variable-length instructions.
It used to be an obj.Link field.
That doesn't play nicely with concurrent assembly.
Move the AsmBuf type to the x86 package,
where it belongs anyway,
and make it a local variable.

Passes toolstash-check -all.
No compiler performance impact.

Updates #15756

Change-Id: I8014e52145380bfd378ee374a0c971ee5bada917
Reviewed-on: https://go-review.googlesource.com/38663
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/x86/asm6.go
src/cmd/vet/all/whitelist/all.txt