diff options
| author | Russ Cox <rsc@golang.org> | 2014-04-06 10:30:02 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-04-06 10:30:02 -0400 |
| commit | 844ec6bbe3753c8142fe3b45cf288749ffa9493a (patch) | |
| tree | 5b6927932132288a8a10ef5f24e6cc568f69d98b /src/cmd/gc | |
| parent | 258ee61c7240b7b147a672fdff9552981a182447 (diff) | |
| download | go-844ec6bbe3753c8142fe3b45cf288749ffa9493a.tar.xz | |
cmd/8g: fix liveness for 387 build (including plan9)
TBR=khr
CC=golang-codereviews
https://golang.org/cl/84570045
Diffstat (limited to 'src/cmd/gc')
| -rw-r--r-- | src/cmd/gc/plive.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cmd/gc/plive.c b/src/cmd/gc/plive.c index f6db02be54..eb89017338 100644 --- a/src/cmd/gc/plive.c +++ b/src/cmd/gc/plive.c @@ -755,7 +755,15 @@ Next: if(prog->as == AVARDEF || prog->as == AVARKILL) bvset(varkill, pos); } else { - if(info.flags & (RightRead | RightAddr)) + // RightRead is a read, obviously. + // RightAddr by itself is also implicitly a read. + // + // RightAddr|RightWrite means that the address is being taken + // but only so that the instruction can write to the value. + // It is not a read. It is equivalent to RightWrite except that + // having the RightAddr bit set keeps the registerizer from + // trying to substitute a register for the memory location. + if((info.flags & RightRead) || (info.flags & (RightAddr|RightWrite)) == RightAddr) bvset(uevar, pos); if(info.flags & RightWrite) if(to->node != nil && (!isfat(to->node->type) || prog->as == AVARDEF)) |
