8c, 6c: fix mulgen botch error for handling multiplication by zero constant

This commit is contained in:
cinap_lenrek 2014-03-21 19:05:17 +01:00
parent 294e940f57
commit 393dfd1ced
2 changed files with 10 additions and 0 deletions

View file

@ -312,6 +312,11 @@ mulgen1(ulong v, Node *n)
Mparam *p;
Node nod, nods;
if(v == 0){
zeroregm(n);
return 1;
}
for(i = 0; i < nelem(multab); i++) {
p = &multab[i];
if(p->value == v)

View file

@ -312,6 +312,11 @@ mulgen1(ulong v, Node *n)
Mparam *p;
Node nod, nods;
if(v == 0){
zeroregm(n);
return 1;
}
for(i = 0; i < nelem(multab); i++) {
p = &multab[i];
if(p->value == v)