avoid keyword clash by using cons for constants

This commit is contained in:
Quentin Carbonneaux 2015-08-01 15:46:09 -04:00
parent a2a2231027
commit 0d5fb419e3
4 changed files with 33 additions and 33 deletions

View file

@ -41,7 +41,7 @@ sel(Ins *i, Fn *fn)
}
emit(OCopy, i->to, r0, R);
emit(OCopy, R, r1, R);
if (rtype(i->arg[1]) == RConst) {
if (rtype(i->arg[1]) == RCons) {
/* immediates not allowed for
* divisions in x86
*/
@ -52,7 +52,7 @@ sel(Ins *i, Fn *fn)
emit(OIADiv, R, r0, R);
emit(OIACltd, SYM(RDX), R, R);
emit(OCopy, SYM(RAX), i->arg[0], R);
if (rtype(i->arg[1]) == RConst)
if (rtype(i->arg[1]) == RCons)
emit(OCopy, r0, i->arg[1], R);
break;
case OAdd: