1
0
mirror of https://github.com/golang/go synced 2024-10-05 14:01:21 -06:00
Commit Graph

89 Commits

Author SHA1 Message Date
Rob Pike
2d25318f08 asm: fix error messages and comments for "register pair"
The parser treats (R1+R2) on ppc64 the same as (R1,R2) on arm,
but it is not strictly a "register pair". Improve the text.

No semantic change.

Change-Id: Ib8b14881c6467add0d53150a901c01e962afb28b
Reviewed-on: https://go-review.googlesource.com/12212
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 05:45:29 +00:00
Rob Pike
1b74c71da5 cmd/asm: add copyright notices to tests
They were missing from the inputs.
Unfortunately this means the .out files all have wrong line numbers,
but they are easy to update.

Change-Id: I254742f24ab803421f34d52d13b9afa93674edd6
Reviewed-on: https://go-review.googlesource.com/11958
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-09 03:27:48 +00:00
Rob Pike
aea348a3af cmd/asm: add tests for erroneous expressions
Also add a couple more errors, such as modulo with a zero divisor.

Change-Id: If24c95477f7ae86cf4aef5b3460e9ec249ea5ae2
Reviewed-on: https://go-review.googlesource.com/11535
Reviewed-by: Russ Cox <rsc@golang.org>
2015-06-26 23:33:39 +00:00
Rob Pike
989b372a5c cmd/asm: fix shifts again, this time for sure
There are two conditions to worry about:

1) The shift count cannot be negative. Since the evaluator uses unsigned
arithmetic throughout, this means checking that the high bit of
the shift count is always off, which is done by converting to int64
and seeing if the result is negative.

2) For right shifts, the value cannot be negative. We don't want a
high bit in the value because right shifting a value depends on the
sign, and for clarity we always want unsigned shifts.

Next step is to build some testing infrastructure for the parser.

Change-Id: I4c46c79989d02c107fc64954403fc18613763f1d
Reviewed-on: https://go-review.googlesource.com/11326
Reviewed-by: Russ Cox <rsc@golang.org>
2015-06-23 06:44:54 +00:00
Rob Pike
58d177c63e cmd/asm: fix handling of negative shifts.
The change that "fixed" LSH was incorrect, and the fix for RSH was poor.
Make both use a correct, simple test: if the 64-bit value as a signed
integer is negative, it's an error.

Really fixes #11278.

Change-Id: I72cca03d7ad0d64fd649fa33a9ead2f31bd2977b
Reviewed-on: https://go-review.googlesource.com/11325
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-22 20:42:22 +00:00
Rob Pike
71859efceb cmd/asm: remove needless check for negative right shift
In the parser, the shift value is always a uint64.

Change-Id: I9b50295a9f7d174ed1f6f9baf78ec0ed43db417f
Reviewed-on: https://go-review.googlesource.com/11322
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-22 06:57:19 +00:00
Rob Pike
3cab4760d5 cmd/asm: remove pointless check for negative uint
Fixes #11278.

Change-Id: Ic46fda0f42cefedc3f6085c0e77e67616ce4955e
Reviewed-on: https://go-review.googlesource.com/11297
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-06-21 03:11:01 +00:00
Ainar Garipov
7f9f70e5b6 all: fix misprints in comments
These were found by grepping the comments from the go code and feeding
the output to aspell.

Change-Id: Id734d6c8d1938ec3c36bd94a4dbbad577e3ad395
Reviewed-on: https://go-review.googlesource.com/10941
Reviewed-by: Aamir Khan <syst3m.w0rm@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-06-11 14:18:57 +00:00
Austin Clements
16310571d1 cmd/asm: drop legacy RETURN mnemonic on ppc64
Change-Id: I999b57ef5535c18e02cc27c9bc9f896d73126b50
Reviewed-on: https://go-review.googlesource.com/10674
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
2015-06-06 00:11:13 +00:00
Josh Bleecher Snyder
4ed7d06a87 cmd/asm: delete Addr.Reg2
That which cannot happen has not happened.

No immediate changes to Addr or Prog size.

Change-Id: I4cb9315f2c9f5f92eda340bfc4abb46395fa467f
Reviewed-on: https://go-review.googlesource.com/10513
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-05-30 02:47:25 +00:00
Russ Cox
c413c45e6d cmd/internal/obj: make Prog.From3 a pointer
It is almost never set and Addr is large, so having the full struct
in the Prog wastes memory most of the time.

Before (on a 64-bit system):

$ sizeof -p cmd/internal/obj Addr Prog
Addr 80
Prog 376
$

After:

$ sizeof -p cmd/internal/obj Addr Prog
Addr 80
Prog 304
$

Change-Id: I491f201241f87543964a7d0f48b85830759be9d0
Reviewed-on: https://go-review.googlesource.com/10457
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-05-29 16:19:02 +00:00
Shenghou Ma
0f27b91522 cmd/internal/obj: make arm64 use RegTo2 instead of a full fledged Addr To2
It shrinks Prog type from 448 bytes down to 376 bytes on amd64.

It also makes sense, because I don't know of any modern architecture
that have instructions which can write to two destinations, none of
which is a register (even x86 doesn't have such instructions).

Change-Id: I3061f1c9ac93d79ee2b92ecb9049641d0e0f6300
Reviewed-on: https://go-review.googlesource.com/10330
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-05-28 01:09:38 +00:00
Russ Cox
cf932cd897 all: retire architecture letter in file names, public API
This CL removes the remaining visible uses of the "architecture letter" concept.
(They are no longer in tool names nor in source directory names.)

Because the architecture letter concept is now gone, delete GOCHAR
from "go env" output, and change go/build.ArchChar to return an
error always.

The architecture letter is still used in the compiler and linker sources
as a clumsy architecture enumeration, but that use is not visible to
Go users and can be cleaned up separately.

Change-Id: I4d97a38f372003fb610c9c5241bea440d9dbeb8d
Reviewed-on: https://go-review.googlesource.com/10289
Reviewed-by: Rob Pike <r@golang.org>
2015-05-21 17:32:17 +00:00
Matthew Dempsky
1467776b17 cmd/internal/obj: update callers to Linkline{fmt,hist} and remove
Does the TODOs added by https://golang.org/cl/7623.

Passes rsc.io/toolstash/buildall.

Change-Id: I23913a8f03834640e9795d48318febb3f88c10f9
Reviewed-on: https://go-review.googlesource.com/9160
Reviewed-by: Russ Cox <rsc@golang.org>
2015-05-15 17:45:39 +00:00
Dave Cheney
e9ab343f0e cmd/internal/obj: clean up Biobuf
This is a follow up to rev 443a32e707 which reduces some of the
duplication between methods and functions that operate on obj.Biobuf.

obj.Biobuf has Flush and Write methods as well as helpers which duplicate
those methods, consolidate on the former and remove the latter.

Also, address a final comment from CL 9525.

Change-Id: I67deaf3a163bb489a9bb21bb39524785d7a2f6c5
Reviewed-on: https://go-review.googlesource.com/9527
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-05-01 18:37:04 +00:00
Rob Pike
a88994c137 cmd/asm: add comments back for aliases on jumps for x86
These were lost in the transition from 8a/6a to asm.
Also, in the process, discover more aliases. I'm betting the missing
ones were a casualty of the recent merge of 386 and amd64.

Update #10385.

Change-Id: I1681034b25af3ffc103f75e5fc57baca5feb3fcd
Reviewed-on: https://go-review.googlesource.com/9431
Reviewed-by: Russ Cox <rsc@golang.org>
2015-04-28 19:41:19 +00:00
Matthew Dempsky
e7ffafdb6e cmd/internal/obj: remove useless Trimpath field and fix users
http://golang.org/cl/7623 refactored how line history works and
introduced a new TrimPathPrefix field to replace the existing Trimpath
field, but never removed the latter or updated its users.

Fixes #10503.

Change-Id: Ief90a55b6cef2e8062b59856a4c7dcc0df01d3f2
Reviewed-on: https://go-review.googlesource.com/9113
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
2015-04-20 20:46:06 +00:00
Michael Hudson-Doyle
84207a2500 cmd/internal/obj/x86, cmd/internal/ld, cmd/6l: 6g/asm -dynlink accesses global data via a GOT
Change-Id: I49862e177045369d6c94d6a58afbdace4f13cc96
Reviewed-on: https://go-review.googlesource.com/8237
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-04-10 03:47:47 +00:00
Dave Cheney
ef49b4ca78 cmd/internal/obj/arm64, cmd/asm/internal/asm: support CSEL instruction on arm64
Add support for arm64 four operand conditional instructions.

Superceedes CL 8405.

Change-Id: I12da8f4822938feec400bbcc426eeaf884536135
Reviewed-on: https://go-review.googlesource.com/8638
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2015-04-09 08:07:21 +00:00
Rob Pike
3b1d0d0f07 cmd/asm: remove object file if assembly fails.
Just an oversight. Plus the code had an unnecessary call to os.Exit
that now has a purpose.

Fixes #10372.

Change-Id: I456018f3a01ca05b4501c7f8a4961d48ab8c5e16
Reviewed-on: https://go-review.googlesource.com/8651
Reviewed-by: Minux Ma <minux@golang.org>
2015-04-08 18:29:17 +00:00
Dave Cheney
fb919e3a60 cmd/asm/internal/asm: add arm64 end to end tests
Add end to end tests for arm64 to support CL 8405.

There are several instruction forms commented out at the moment
they will be addressed in CL 8405 or later followups.

Change-Id: I6eeeb810c1e03cd49bb3c881bc46a29cdb817822
Reviewed-on: https://go-review.googlesource.com/8631
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Rob Pike <r@golang.org>
2015-04-08 14:42:51 +00:00
Shenghou Ma
a175fa3bc3 cmd/asm/internal/asm: parse arm64 register pairs for LDP/STP
Add test, and while we're at here, also add a test for ARM.

Fixes #10343.

Change-Id: Ic914df8233d4f1f495e2cc0743fbd37b7671bc91
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/8472
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Rob Pike <r@golang.org>
2015-04-08 05:22:41 +00:00
Rob Pike
dfc9e264d1 cmd/asm/internal/asm: fix comment in ppc64.go
It referred to the wrong architecture.

Fixes #10355.

Change-Id: I5b9d31c9f04f3106b93f94fa68c848b2518b128e
Reviewed-on: https://go-review.googlesource.com/8495
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-04-06 18:23:13 +00:00
Russ Cox
532ccae154 cmd/internal/obj: replace Addr.U struct {...} with Val interface{}
An interface{} is more in the spirit of the original union.
By my calculations, on 64-bit systems this reduces
Addr from 120 to 80 bytes, and Prog from 592 to 424 bytes.

Change-Id: I0d7b0981513c2a3c94c9ac76bb4f8816485b5a3c
Reviewed-on: https://go-review.googlesource.com/7744
Reviewed-by: Rob Pike <r@golang.org>
2015-03-20 04:47:08 +00:00
Aram Hăvărneanu
18d9ddc35c cmd/asm: add support for ARM64
Pre/post-index addressing modes with writeback use .W and .P
instruction suffixes, like on ARM.

Complex addressing modes are not supported yet.

Change-Id: I537a1c3fe5b057c0812662677d0010bc8c468ffb
Reviewed-on: https://go-review.googlesource.com/7047
Reviewed-by: Rob Pike <r@golang.org>
2015-03-16 18:45:08 +00:00
Rob Pike
6d0e87afe6 cmd/asm: add MRC and MCR to end-to-end test for arm
The old, per-architecture operand printers didn't lock down the
format of the constant in the MRC and MCR instructions (a value
that could be presented more helpfully - maybe how the
input looks? - but that is an issue for another day). But there is
a portable standard printer now so we can enable tests for these
instructions.

Change-Id: I437a3b112ce63f4d6e1fe3450fc21d8c3372602f
Reviewed-on: https://go-review.googlesource.com/7420
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-12 18:03:04 +00:00
Michael Hudson-Doyle
c9089e64be cmd/asm/internal/asm: report arch if assembly fails
Just a trivial thing I noticed in passing.

Change-Id: I875069ceffd623f9e430d07feb5042ab9e69917e
Reviewed-on: https://go-review.googlesource.com/7472
Reviewed-by: Rob Pike <r@golang.org>
2015-03-12 14:00:43 +00:00
Rob Pike
5d987f1513 cmd/asm: implement MCR instruction on ARM
It's an oddball that needs special treatment because it is not really
an opcode, but a variant of MRC.

The String method of Prog still needs updating to print it nicely.

Change-Id: I6005b7f2234ccd3d4ac1f658948e3be97cf1f1c2
Reviewed-on: https://go-review.googlesource.com/7220
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-11 17:22:03 +00:00
Rob Pike
24a43e6a75 cmd/internal/obj: delete all Pconv, replace with Prog.String
Remove the per-achitecture formatter for Prog and replace it with
a global String method. Clean up and regularize the output. Update
tests affected by the format; some tests are made correct now when
they were broken before (and known to be).

Also, related: Change the encoding of the (R1+R2) syntax on ppc64
to be equivalent to (R1)(R2*1), which means it needs no special
handling.

Delete the now unused STRINGSZ constant.

Change-Id: I7f6654d11f80065f3914a3f19353f2f12edfe310
Reviewed-on: https://go-review.googlesource.com/6931
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-05 19:18:46 +00:00
Rob Pike
b0d545201e cmd/asm: fix (printing of) TEXT flags
With the new unificiation, the flag must be TYPE_CONST to print
properly.

Change-Id: I7cd1c56355724f08cbe9afc6ab7a66904031adc9
Reviewed-on: https://go-review.googlesource.com/6903
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-05 06:09:14 +00:00
Rob Pike
845c4ff52a cmd/asm: update to use new encoding for x86 instructions
Support the old syntax for AX:DX by rewriting into the new form,
AX, DX. Delete now-unnecessary hacks for some special cases.

Change-Id: Icd42697c7617f8a50864ca8b0c69469321a2296e
Reviewed-on: https://go-review.googlesource.com/6901
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-05 05:24:58 +00:00
Russ Cox
0bf79b2de8 cmd/internal/obj/x86: take over i386 duty, clean up PINSRQ, CMPSD
Make cmd/internal/obj/x86 support 32-bit mode and use
instead of cmd/internal/obj/i386. Delete cmd/internal/obj/i386.

Clean up encoding of PINSRQ, CMPSD to use explicit third arg
instead of jamming it into an unused slot of a different arg.

Also fix bug in old6a, which declared the wrong grammar.
The accepted (and encoded) arguments to CMPSD etc are mem,reg not reg,mem.
Code that did try to use mem,reg before would be rejected by liblink,
so only reg,reg ever worked, so existing code is not affected.
After this change, code can use mem,reg successfully.

The real bug here is that the encoding tables inverted the argument
order, making the comparisons all backward from what they say on the page.
It's too late to swap them, though: people have already written code that
expects the inverted comparisons (like in package math, and likely externally).
The best we can do is make the argument that should and can take a
memory operand accept it.

Bit-for-bit compatibility checked against tree without this CL.

Change-Id: Ife5685bc98c95001f64407f35066b34b4dae11c1
Reviewed-on: https://go-review.googlesource.com/6810
Reviewed-by: Rob Pike <r@golang.org>
2015-03-05 04:13:43 +00:00
Michael Hudson-Doyle
09d9520be9 liblink, cmd/6l: re-enable -shared on amd64
The creation of liblink and subsequent introduction of more explicit
TLS handling broke 6l's (unsupported) -shared flag.  This change adds
-shared flags to cmd/asm and 6g and changes liblink to generate shared-
library compatible instruction sequences when they are passed, and
changes 6l to emit the appropriate ELF relocation.

A proper fix probably also requires go tool changes.

Fixes #9652.

Change-Id: I7b7718fe7305c802ac994f4a5c8de68cfbe6c76b
Reviewed-on: https://go-review.googlesource.com/4321
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-03-04 01:55:30 +00:00
Rob Pike
b745ab95af cmd/asm: move some machine-dependent code out of the asm directory
cmd/asm/internal/asm no longer imports obj/$GOARCH, only obj itself.

Change-Id: I7c0d107524d833b4a1b6e6a497cca4addadee570
Reviewed-on: https://go-review.googlesource.com/6670
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-04 00:01:01 +00:00
Rob Pike
f05f273525 cmd/internal/obj: print g for the g register on arm and ppc64
The name g is an alias for R10 and R30, respectively. Have Rconv
print the alias, for consistency with the input language.

Change-Id: Ic3f40037884a0c8de5089d8c8a8efbcdc38c0d56
Reviewed-on: https://go-review.googlesource.com/6630
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-04 00:00:51 +00:00
Rob Pike
9a420f4cf3 cmd/asm: LOOP is a branch instruction on x86
Just a missed case in in the handling of branches.

Fixes #10065

Change-Id: I6be054d30bf1f383c12b4c7626abd5f8ae22b22e
Reviewed-on: https://go-review.googlesource.com/6631
Reviewed-by: Minux Ma <minux@golang.org>
2015-03-03 22:44:24 +00:00
Rob Pike
74e88dfdee 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>
2015-03-03 17:06:27 +00:00
Rob Pike
8974fb9ba5 cmd/internal/obj: move the "unary destination" tables from asm to obj/*
Have the implementations of each architecture declare the one-operand,
destination-writing instructions instead of splitting the information between
there and asm.

Change-Id: I44899435011a4a7a398ed03c0801e9f81cc8c905
Reviewed-on: https://go-review.googlesource.com/6490
Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-02 19:32:29 +00:00
Rob Pike
0eeb5cf088 cmd/internal/obj: clean up handling of register list operand on ARM
ARM operands for MOVM have lists of registers: [R1,R2,R5-R8].
Handle them cleanly.

It was TYPE_CONST with special handling, which meant operand printing
didn't work right and the special handling was ugly. Add a new TYPE_REGLIST
for this case and it all gets cleaner.

Change-Id: I4a64f70fb9765e63cb636619a7a8553611bfe970
Reviewed-on: https://go-review.googlesource.com/6300
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-28 20:10:59 +00:00
Rob Pike
2b417dc3e1 cmd/internal/obj: make ppc64's CR subregisters print as CRn rather than Cn
These 8 registers are windows into the CR register. They are officially CR0
through CR7 and that is what the assembler accepts, but for some reason
they have always printed as C0 through C7. Fix the naming and printing.

Change-Id: I55822c0322c29d3e01a1f2776b3b210ebf9ded21
Reviewed-on: https://go-review.googlesource.com/6290
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-27 21:06:25 +00:00
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
Rob Pike
940f22eea2 cmd/internal/obj: implement Dconv for TYPE_INDIR
It was just missing, and apparently always was.

Change-Id: I84c057bb0ec72940201075f3e6078262fe4bce05
Reviewed-on: https://go-review.googlesource.com/6120
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-26 22:03:21 +00:00
Rob Pike
29421cbb5b cmd/internal/obj: make Dconv a portable top-level function
Each architecture had its own Dconv (operand printer) but the syntax is
close to uniform and the code overlap was considerable. Consolidate these
into a single top-level function. A similar but smaller unification is done
for Mconv ("Name" formatter) as well.

The signature is changed. The flag was unused so drop it. Add a
function argument, Rconv, that must be supplied by the caller.
TODO: A future change will unify Rconv as well and this argument
will go away.

Some formats changed, because of the automatic consistency
created by unification. For instance, 0(R1) always prints as (R1)
now, and foo+0(SB) is just foo(SB). Before, some made these
simplifications and some didn't; now they all do.

Update the asm tests that depend on the format.

Change-Id: I6e3310bc19814c0c784ff0b960a154521acd9532
Reviewed-on: https://go-review.googlesource.com/5920
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-25 20:59:50 +00:00
Rob Pike
4100f7d95c cmd/go: make asm the first assembler
verifyAsm is still on, but this CL changes the order to asm then 6a.
Before, it was 6a then asm, but that meant that any bugs in asm
for bad input would be prevented from happening because 6a would
catch them. Now asm gets first crack, as it must.

Also implement the -trimpath flag in asm. It's necessary and trivial.

Change-Id: Ifb2ab870de1aa1b53dec76a78ac697a0d36fa80a
Reviewed-on: https://go-review.googlesource.com/5850
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-25 17:10:37 +00:00
Rob Pike
df5cfe7c1f cmd/asm: add end to end test for 386
Change-Id: I6514f69b979d064b6a3c4b5d0828cc94f485cac2
Reviewed-on: https://go-review.googlesource.com/5694
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-25 16:24:32 +00:00
Rob Pike
4241b758af cmd/asm: add a couple of operand parses discovered by end-to-end test
Missing cases for JMP $4 and foo+4(SB):AX. Both are odd but 8a accepts them
and they seem valid.

Change-Id: Ic739f626fcc79ace1eaf646c5dfdd96da59df165
Reviewed-on: https://go-review.googlesource.com/5693
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-25 16:18:54 +00:00
Rob Pike
aff84b171c cmd/asm: fix build for new aliases
Missing leading A on names.

Change-Id: I6f3a66bdd3a21220f45a898f0822930b6a7bfa38
Reviewed-on: https://go-review.googlesource.com/5801
Reviewed-by: Rob Pike <r@golang.org>
2015-02-24 20:31:30 +00:00
Rob Pike
90590a0cd2 cmd/asm: add alias for MOVOA=MOVO on amd64
The alias should exist for both 386 and amd64.
There were a few others missing as well. Add them.

Change-Id: Ia0c3e71abc79f67a7a66941c0d932a8d5d6e9989
Reviewed-on: https://go-review.googlesource.com/5800
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-24 20:01:21 +00:00
Rob Pike
9d6ed4af66 [dev.cc] cmd/asm: add end to end test for amd64
Change-Id: I40839c2d1c0c105a5ba9aadcb55a13693bf4afa6
Reviewed-on: https://go-review.googlesource.com/5592
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-23 19:54:39 +00:00
Russ Cox
6406acf338 [dev.cc] cmd/asm/internal/asm: fix test on windows
Change-Id: Ia6cf3204d71740bc2b6e26c53ac5206e8a33a180
Reviewed-on: https://go-review.googlesource.com/5540
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-21 17:54:38 +00:00