]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: switch to one global Aconv
authorRob Pike <r@golang.org>
Tue, 3 Mar 2015 04:17:20 +0000 (20:17 -0800)
committerRob Pike <r@golang.org>
Tue, 3 Mar 2015 17:06:27 +0000 (17:06 +0000)
commit74e88dfdeebef392d52d3f792e2071b058c1e231
treee066ac4bde456ffd50b2ecaf402020056f97653c
parent91e7ca588d07b8e04e9608c4436d2d701f6c59d0
cmd/internal/obj: switch to one global Aconv

Aconv is the pretty-printer for instruction opcodes like AMOVQ.
There was one for each architecture.
Make the space of A names have a different region for each architecture,
much as we did for the registers, so a single global Aconv function can
do the work. Each architecture registers its region as a slice of names
at a given offset.

The global names like CALL and JMP are now defined only once.

The A values are used for indexing tables, so make it easy to do the
indexing by making the offset maskable.

Remove a bunch of now-duplicated architecture-specific code.

Change-Id: Ib15647b7145a1c089e21e36543691a19e146b60e
Reviewed-on: https://go-review.googlesource.com/6620
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
24 files changed:
src/cmd/5g/peep.go
src/cmd/9g/peep.go
src/cmd/9g/prog.go
src/cmd/asm/internal/arch/arch.go
src/cmd/asm/internal/asm/asm.go
src/cmd/internal/obj/arm/5.out.go
src/cmd/internal/obj/arm/anames5.go
src/cmd/internal/obj/arm/asm5.go
src/cmd/internal/obj/arm/list5.go
src/cmd/internal/obj/i386/8.out.go
src/cmd/internal/obj/i386/anames8.go
src/cmd/internal/obj/i386/asm8.go
src/cmd/internal/obj/i386/list8.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/ppc64/9.out.go
src/cmd/internal/obj/ppc64/anames9.go
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/ppc64/list9.go
src/cmd/internal/obj/util.go
src/cmd/internal/obj/x86/6.out.go
src/cmd/internal/obj/x86/anames6.go
src/cmd/internal/obj/x86/asm6.go
src/cmd/internal/obj/x86/list6.go
src/cmd/internal/obj/x86/obj6.go