summaryrefslogtreecommitdiff
path: root/src/cmd/5g
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2014-11-09 18:55:36 -0800
committerIan Lance Taylor <iant@golang.org>2014-11-09 18:55:36 -0800
commit9103409cfde1cdabad9b7e2475543015db0cc9d0 (patch)
tree62b5a129bffe2a9283423b1d4c30f697bb955572 /src/cmd/5g
parent78d351d121615f1101f28f88920029f20884c689 (diff)
downloadgo-9103409cfde1cdabad9b7e2475543015db0cc9d0.tar.gz
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 issue 9077. LGTM=minux R=minux CC=golang-codereviews https://codereview.appspot.com/172110043
Diffstat (limited to 'src/cmd/5g')
-rw-r--r--src/cmd/5g/reg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/5g/reg.c b/src/cmd/5g/reg.c
index 27d9d3e8b..b78c268df 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;