diff options
| author | Ian Lance Taylor <iant@golang.org> | 2014-11-09 18:55:36 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2014-11-09 18:55:36 -0800 |
| commit | f6661675729bcd9d2dd0149bbcbfccd3facb22f6 (patch) | |
| tree | 54f33f14f20d1b6e033aecffdeb5c5b03026a915 | |
| parent | c99616fc6795123ec1a6b4d742099789865bd939 (diff) | |
| download | go-f6661675729bcd9d2dd0149bbcbfccd3facb22f6.tar.xz | |
cmd/5g: fix bit mask for div/mod routines clobbering R12
This patch is based only on reading the code. I have not
tried to construct a test case.
Fixes #9077.
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/172110043
| -rw-r--r-- | src/cmd/5g/reg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/5g/reg.c b/src/cmd/5g/reg.c index 27d9d3e8be..b78c268df5 100644 --- a/src/cmd/5g/reg.c +++ b/src/cmd/5g/reg.c @@ -230,7 +230,7 @@ regopt(Prog *firstp) /* the mod/div runtime routines smash R12 */ if(p->as == ADIV || p->as == ADIVU || p->as == AMOD || p->as == AMODU) - r->set.b[z] |= RtoB(12); + r->set.b[0] |= RtoB(12); } if(firstr == R) return; |
