1
0
mirror of https://github.com/golang/go synced 2024-09-24 17:10:13 -06:00
The Go programming language
Go to file
Russ Cox 24c8035fbe cmd/6g: move opt instruction decode into common function
Add new proginfo function that returns information about a
Prog*. The information includes various instruction
description bits as well as a list of required registers set
and used and indexing registers used.

Convert the large instruction switches to use proginfo.

This information was formerly duplicated in multiple
optimization passes, inconsistently. For example, the
information about which registers an instruction requires
appeared three times for most instructions.

Most of the switches were incomplete or incorrect in some way.
For example, the switch in copyu did not list cases for INCB,
JPS, MOVAPD, MOVBWSX, MOVBWZX, PCDATA, POPQ, PUSHQ, STD,
TESTB, TESTQ, and XCHGL. Those were all falling into the
"unknown instruction" default case and stopping the rewrite,
perhaps unnecessarily. Similarly, the switch in needc only
listed a handful of the instructions that use or set the carry bit.

We still need to decide whether to use proginfo to generalize
a few of the remaining smaller switches in peep.c.

If this goes well, we'll make similar changes in 8g and 5g.

R=ken2
CC=golang-dev
https://golang.org/cl/12637051
2013-08-11 21:46:38 -04:00
api cmd/api: rewrite using go/types 2013-08-08 14:10:59 -07:00
doc doc/go1.2.txt: json and ampersands 2013-08-12 11:28:25 +10:00
include include/plan9: define size_t to fix build breakage 2013-06-28 12:16:33 -07:00
lib cmd/godoc: delete from core repository 2013-08-01 11:21:17 +10:00
misc misc/emacs: add support for mode=count coverage 2013-08-09 14:42:43 -07:00
src cmd/6g: move opt instruction decode into common function 2013-08-11 21:46:38 -04:00
test runtime: Better test tracebackability of jmpdefer when running a nil defer. 2013-08-09 15:27:45 -07:00
.hgignore build: ignore new zfiles, delete temp goplay binary in run.bash 2013-08-02 19:14:13 -07:00
.hgtags tag go1.1.1 2013-06-13 12:52:02 +10:00
AUTHORS A+C: add googlemail aliases for deemok 2013-08-08 10:40:32 -07:00
CONTRIBUTORS A+C: add googlemail aliases for deemok 2013-08-08 10:40:32 -07:00
favicon.ico godoc: update favicon 2012-10-11 17:02:36 +11:00
LICENSE doc: update licensing text one more time 2012-03-27 15:09:13 +11:00
PATENTS LICENSE: separate, change PATENTS text 2010-12-06 16:31:59 -05:00
README build: update, streamline documentation for new $GOBIN 2010-08-24 20:00:50 -04:00
robots.txt godoc: serve robots.txt raw 2011-02-19 05:46:20 +11:00

This is the source code repository for the Go programming language.  

For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install.html in your web browser.

After installing Go, you can view a nicely formatted
doc/install.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install.html.

Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.

--

Binary Distribution Notes

If you have just untarred a binary Go distribution, you need to set
the environment variable $GOROOT to the full path of the go
directory (the one containing this README).  You can omit the
variable if you unpack it into /usr/local/go, or if you rebuild
from sources by running all.bash (see doc/install.html).
You should also add the Go binary directory $GOROOT/bin
to your shell's path.

For example, if you extracted the tar file into $HOME/go, you might
put the following in your .profile:

    export GOROOT=$HOME/go
    export PATH=$PATH:$GOROOT/bin

See doc/install.html for more details.