mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj: replace AGLOBL with (*Link).Globl
Replace the AGLOBL pseudo-op with a method to directly register an LSym as a global. Similar to how we previously already replaced the ADATA pseudo-op with directly writing out data bytes. Passes toolstash -cmp. Change-Id: I3631af0a2ab5798152d0c26b833dc309dbec5772 Reviewed-on: https://go-review.googlesource.com/29366 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
a1bf203b57
commit
6fe1febc86
9 changed files with 42 additions and 112 deletions
|
|
@ -143,7 +143,7 @@ func (p *Prog) String() string {
|
|||
sep = ", "
|
||||
}
|
||||
if p.From3Type() != TYPE_NONE {
|
||||
if p.From3.Type == TYPE_CONST && (p.As == ATEXT || p.As == AGLOBL) {
|
||||
if p.From3.Type == TYPE_CONST && p.As == ATEXT {
|
||||
// Special case - omit $.
|
||||
fmt.Fprintf(&buf, "%s%d", sep, p.From3.Offset)
|
||||
} else if quadOpAmd64 {
|
||||
|
|
@ -477,7 +477,6 @@ var Anames = []string{
|
|||
"DUFFZERO",
|
||||
"END",
|
||||
"FUNCDATA",
|
||||
"GLOBL",
|
||||
"JMP",
|
||||
"NOP",
|
||||
"PCDATA",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue