major lifting: get rid of RReg

I've been septic since I introduced it, this commit
proves that it costs more than it helps.  I've also fixed
a bad bug in rega() where I alloc'ed the wrong size for
internal arrays.  Enums now have names so I can use them
to cast in gdb to get the name corresponding to a constant.
This commit is contained in:
Quentin Carbonneaux 2015-08-13 16:10:54 -04:00
parent 78bf28f56e
commit 5fc8104e00
8 changed files with 97 additions and 142 deletions

View file

@ -122,12 +122,12 @@ sel(Ins i, Fn *fn)
default:
diag("isel: invalid division");
case TWord:
ra = REG(EAX);
rd = REG(EDX);
ra = TMP(EAX);
rd = TMP(EDX);
break;
case TLong:
ra = REG(RAX);
rd = REG(RDX);
ra = TMP(RAX);
rd = TMP(RDX);
break;
}
r0 = i.op == ODiv ? ra : rd;
@ -230,6 +230,7 @@ flagi(Ins *i0, Ins *i)
return 0;
case OAdd: /* flag-setting */
case OSub:
case OAnd:
return i;
case OCopy: /* flag-transparent */
case OStorel: