cmd/internal/obj/arm64: make assembler almost concurrency-safe

CL 39922 made the arm assembler concurrency-safe.
This CL does the same, but for arm64.
The approach is similar: introduce ctxt7 to hold
function-local state and thread it through
the assembler as necessary.

One race remains after this CL, deep in aclass,
in the check that a Prog does not take the address
of a TLS variable.

That race is conceptually unrelated to this refactoring,
and will be addressed in a separate CL.

Passes toolstash-check -all.

Updates #15756

Change-Id: Icab1ef70008468f9a5b8bf728a77c4520bbcb67d
Reviewed-on: https://go-review.googlesource.com/40252
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Josh Bleecher Snyder 2017-04-10 11:17:49 -07:00
parent c4135d61bb
commit b5931020b7
3 changed files with 457 additions and 444 deletions

View file

@ -728,8 +728,6 @@ type Link struct {
Imports []string
Plan9privates *LSym
Printp *Prog
Blitrl *Prog
Elitrl *Prog
Instoffset int64
Autosize int32
Pc int64