cosmetic fixes
This commit is contained in:
parent
2c2db15995
commit
da9a30bd77
1 changed files with 8 additions and 15 deletions
23
copy.c
23
copy.c
|
@ -63,30 +63,23 @@ iscopy(Ins *i, Ref r, Fn *fn)
|
||||||
[Wsw] = BIT(Wsw),
|
[Wsw] = BIT(Wsw),
|
||||||
[Wuw] = BIT(Wuw),
|
[Wuw] = BIT(Wuw),
|
||||||
};
|
};
|
||||||
int k, w;
|
bits b;
|
||||||
Tmp *t;
|
Tmp *t;
|
||||||
|
|
||||||
if (i->op == Ocopy)
|
if (i->op == Ocopy)
|
||||||
return 1;
|
return 1;
|
||||||
if (!isext(i->op))
|
if (!isext(i->op) || rtype(r) != RTmp)
|
||||||
return 0;
|
return 0;
|
||||||
if (i->op == Oextsw || i->op == Oextuw)
|
if (i->op == Oextsw || i->op == Oextuw)
|
||||||
if (i->cls == Kw)
|
if (i->cls == Kw)
|
||||||
return 1;
|
return 1;
|
||||||
if (rtype(r) == RTmp) {
|
|
||||||
t = &fn->tmp[r.val];
|
t = &fn->tmp[r.val];
|
||||||
w = t->width;
|
assert(KBASE(t->cls) == 0);
|
||||||
k = t->cls;
|
if (i->cls == Kl && t->cls == Kw)
|
||||||
assert(k == Kw || k == Kl);
|
|
||||||
} else {
|
|
||||||
assert(rtype(r) == RCon);
|
|
||||||
w = WFull;
|
|
||||||
k = Kl;
|
|
||||||
}
|
|
||||||
if (i->cls == Kl && k == Kw)
|
|
||||||
/* not enough bits in r */
|
|
||||||
return 0;
|
return 0;
|
||||||
return (BIT(Wsb + (i->op - Oextsb)) & extcpy[w]) != 0;
|
b = extcpy[t->width];
|
||||||
|
return (BIT(Wsb + (i->op-Oextsb)) & b) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue