mirror of
git://c9x.me/qbe.git
synced 2026-04-06 18:39:48 +00:00
make sure tests emitted are encodable
This commit is contained in:
parent
ca8c320dec
commit
e1725c0cdd
@ -333,6 +333,11 @@ seljmp(Blk *b, Fn *fn)
|
|||||||
fi->op = OXTestw;
|
fi->op = OXTestw;
|
||||||
fi->to = R;
|
fi->to = R;
|
||||||
b->jmp.type = JXJc + Cne;
|
b->jmp.type = JXJc + Cne;
|
||||||
|
if (rtype(fi->arg[1]) == RCon) {
|
||||||
|
r = fi->arg[1];
|
||||||
|
fi->arg[1] = fi->arg[0];
|
||||||
|
fi->arg[0] = r;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fn->tmp[r.val].nuse > 1) {
|
if (fn->tmp[r.val].nuse > 1) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user