Produce cleaner output for a = b op c.

This commit is contained in:
Bill Currie 2011-02-11 14:01:18 +09:00
parent d93d8d7d46
commit 370f0b97ed

View file

@ -289,10 +289,13 @@ expr_assign (sblock_t *sblock, expr_t *e, operand_t **op)
if (e->e.expr.op == '=') {
sblock = statement_subexpr (sblock, dst_expr, &dst);
src = dst;
sblock = statement_subexpr (sblock, src_expr, &src);
ofs = 0;
if (op)
*op = dst;
if (src == dst)
return sblock;
} else {
//FIXME this sucks. find a better way to handle both pointer
//dereferences and pointer assignements