1
0
mirror of https://github.com/golang/go synced 2024-10-05 07:11:22 -06:00
go/src/cmd/9g
Rob Pike daddeb2686 cmd/internal/obj: make Rconv a global function
Clean up the obj API by making Rconv (register pretty printer) a top-level
function. This means that Dconv (operand pretty printer) doesn't need
an Rconv argument.

To do this, we make the register numbers, which are arbitrary inside an
operand (obj.Addr), disjoint sets for each architecture. Each architecture
registers (ha) a piece of the space and then the global Rconv knows which
architecture-specific printer to use.

Clean up all the code that uses Dconv.

Now register numbers are large, so a couple of fields in Addr need to go
from int8 to int16 because they sometimes hold register numbers. Clean
up their uses, which meant regenerating the yacc grammars for the
assemblers. There are changes in this CL triggered by earlier changes
to yacc, which had not been run in this directory.

There is still cleanup to do in Addr, but we're getting closer to that being
easy to do.

Change-Id: I9290ebee013b62f7d24e886743ea5a6b232990ab
Reviewed-on: https://go-review.googlesource.com/6220
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-27 03:51:33 +00:00
..
cgen.go [dev.cc] cmd/5g etc: code cleanup: delay var decls and eliminate dead code 2015-02-23 21:36:06 +00:00
galign.go [dev.cc] cmd/6a, cmd/6g etc: replace C implementations with Go implementations 2015-02-23 19:56:40 +00:00
gg.go [dev.cc] cmd/6a, cmd/6g etc: replace C implementations with Go implementations 2015-02-23 19:56:40 +00:00
ggen.go cmd/internal/obj: make Rconv a global function 2015-02-27 03:51:33 +00:00
gsubr.go cmd/internal/obj: make Rconv a global function 2015-02-27 03:51:33 +00:00
opt.go [dev.cc] cmd/6a, cmd/6g etc: replace C implementations with Go implementations 2015-02-23 19:56:40 +00:00
peep.go [dev.cc] cmd/5g etc: code cleanup: delay var decls and eliminate dead code 2015-02-23 21:36:06 +00:00
prog.go [dev.cc] cmd/5g etc: code cleanup: delay var decls and eliminate dead code 2015-02-23 21:36:06 +00:00
reg.go [dev.cc] cmd/5g etc: code cleanup: delay var decls and eliminate dead code 2015-02-23 21:36:06 +00:00
util.go [dev.cc] cmd/6a, cmd/6g etc: replace C implementations with Go implementations 2015-02-23 19:56:40 +00:00