]> Cypherpunks repositories - gostls13.git/commit
[dev.cc] cmd/asm: rewrite to work with new obj API
authorRob Pike <r@golang.org>
Fri, 6 Feb 2015 19:39:23 +0000 (11:39 -0800)
committerRob Pike <r@golang.org>
Mon, 9 Feb 2015 18:48:19 +0000 (18:48 +0000)
commitcb19a20121cc9f5171df7bf537f6f741080b5a60
tree150e7ec74dc8558ef8e5c5888980d4f792ec1138
parent1fc330d8fe0ce6cbc6fd1f47c1cf035119566fc7
[dev.cc] cmd/asm: rewrite to work with new obj API

Considerable rewriting of the parser and assembler (code generator)
but it's simpler and shorter now. The internal Addr type is gone; so
is the package that held it. Parsing of operands goes directly into
obj.Addrs now.

There is a horrible hack regarding register pairs. It uses the Class
field to store the second register since it needs _some_ place to
put it but none is provided in the API. An alternative would be nice
but this works for now.

Once again creates identical .6 and .8 files as the old assembler.

Change-Id: I8207d6dfdfdb5bbed0bd870cb34ee0fe61c2fbfd
Reviewed-on: https://go-review.googlesource.com/4062
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/asm/internal/addr/addr.go [deleted file]
src/cmd/asm/internal/arch/arch.go
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/parse.go
src/cmd/asm/internal/lex/lex.go
src/cmd/asm/internal/lex/stack.go
src/cmd/asm/main.go