mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
Implement offset dereferences.
This commit is contained in:
parent
d2b464053c
commit
65a07ada1c
1 changed files with 9 additions and 0 deletions
|
@ -426,6 +426,15 @@ expr_deref (sblock_t *sblock, expr_t *e, operand_t **op)
|
|||
*op = new_operand (op_symbol);
|
||||
(*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 ("=");
|
||||
sblock = statement_subexpr (sblock, e->e.expr.e1, &s->opa);
|
||||
sblock = statement_subexpr (sblock, e->e.expr.e2, &s->opb);
|
||||
if (!*op) {
|
||||
*op = new_operand (op_temp);
|
||||
(*op)->type = low_level_type (e->e.expr.type);
|
||||
}
|
||||
s->opc = *op;
|
||||
}
|
||||
return sblock;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue