Add the statement for based loads.

Oops :P
This commit is contained in:
Bill Currie 2011-02-09 22:40:16 +09:00
parent a43946abf3
commit 006c16807d

View file

@ -430,7 +430,7 @@ expr_deref (sblock_t *sblock, expr_t *e, operand_t **op)
(*op)->type = low_level_type (type);
(*op)->o.symbol = e->e.expr.e1->e.symbol;
} else if (e->type == ex_expr && e->e.expr.op == '&') {
statement_t *s = new_statement ("=", e);
statement_t *s = new_statement (".", e);
sblock = statement_subexpr (sblock, e->e.expr.e1, &s->opa);
sblock = statement_subexpr (sblock, e->e.expr.e2, &s->opb);
if (!*op) {
@ -438,6 +438,7 @@ expr_deref (sblock_t *sblock, expr_t *e, operand_t **op)
(*op)->type = low_level_type (e->e.expr.type);
}
s->opc = *op;
sblock_add_statement (sblock, s);
} else if (e->type == ex_value && e->e.value.type == ev_pointer) {
*op = new_operand (op_pointer);
(*op)->type = low_level_type (e->e.value.v.pointer.type);