stop using OXxx1 and use new OLoad

This commit is contained in:
Quentin Carbonneaux 2016-02-18 19:40:40 -05:00
parent 7922b259d9
commit 97cfdc309e
6 changed files with 34 additions and 53 deletions

View file

@ -242,17 +242,12 @@ sethint(Bits *u, ulong r)
static void
reloads(Bits *u, Bits *v)
{
/* fixme, oooh really... */
static int kload[] = {
[Kw] = OLoadsw, [Kl] = OLoadl,
[Ks] = OLoads, [Kd] = OLoadd
};
int t, k;
for (t=Tmp0; t<ntmp; t++)
if (BGET(*u, t) && !BGET(*v, t)) {
k = tmp[t].cls;
emit(kload[k], k, TMP(t), slot(t), R);
emit(OLoad, k, TMP(t), slot(t), R);
}
}