go/src/cmd/8g
Russ Cox 0a8a719ded cmd/5g, cmd/6g, cmd/8g: preserve wide values in large functions
In large functions with many variables, the register optimizer
may give up and choose not to track certain variables at all.
In this case, the "nextinnode" information linking together
all the words from a given variable will be incomplete, and
the result may be that only some of a multiword value is
preserved across a call. That confuses the garbage collector,
so don't do that. Instead, mark those variables as having
their address taken, so that they will be preserved at all
calls. It's overkill, but correct.

Tested by hand using the 6g -S output to see that it does fix
the buggy generated code leading to the issue 7726 failure.

There is no automated test because I managed to break the
compiler while writing a test (see issue 7727). I will check
in a test along with the fix to issue 7727.

Fixes #7726.

LGTM=khr
R=khr, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/85200043
2014-04-16 13:59:42 -04:00
..
Makefile
cgen.c cmd/6g, cmd/8g: disable Duff's device on NaCl. 2014-04-04 08:42:35 +02:00
cgen64.c
doc.go cmd/godoc: use go/build to determine package and example files 2013-02-19 11:19:58 -08:00
galign.c cmd/gc, cmd/5g, cmd/6g, cmd/8g: introduce linkarchinit and add amd64p32 support 2014-03-07 15:33:44 +11:00
gg.h 5g, 8g: remove dead code 2014-02-25 14:43:53 -08:00
ggen.c cmd/6g, cmd/8g: disable Duff's device on NaCl. 2014-04-04 08:42:35 +02:00
gobj.c cmd/gc: bypass DATA instruction for data initialized to integer constant 2013-12-20 14:24:39 -05:00
gsubr.c cmd/ld: clear unused ctxt before morestack 2014-03-04 13:53:08 -05:00
opt.h cmd/cc, cmd/gc, cmd/ld: consolidate print format routines 2014-02-12 14:29:11 -05:00
peep.c cmd/gc: shorten temporary lifetimes when possible 2014-04-01 13:31:38 -04:00
prog.c cmd/8g: fix liveness for 387 build (including plan9) 2014-04-06 10:30:02 -04:00
reg.c cmd/5g, cmd/6g, cmd/8g: preserve wide values in large functions 2014-04-16 13:59:42 -04:00