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
This commit is contained in:
Ian Lance Taylor 2014-11-09 18:55:36 -08:00
parent c99616fc67
commit f666167572
1 changed files with 1 additions and 1 deletions

View File

@ -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;