mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
[qfcc] Make lea generate a pointer operand
I really need to come up with a better way to get the result type into the flow analyser. However, this fixes the aliasing ICE when optimizing Ruamoko code that uses struct assignment.
This commit is contained in:
parent
6514e09e7c
commit
4ec3486a4b
1 changed files with 7 additions and 0 deletions
|
@ -873,6 +873,13 @@ expr_assign_copy (sblock_t *sblock, expr_t *e, operand_t **op, operand_t *src)
|
||||||
sblock = statement_subexpr (sblock, src_expr, &use);
|
sblock = statement_subexpr (sblock, src_expr, &use);
|
||||||
}
|
}
|
||||||
if (options.code.progsversion == PROG_VERSION) {
|
if (options.code.progsversion == PROG_VERSION) {
|
||||||
|
// FIXME it was probably a mistake extracting the operand
|
||||||
|
// type from the statement expression in dags. Also, can't
|
||||||
|
// use address_expr() because src_expr may be a function call
|
||||||
|
// and unary_expr doesn't like that
|
||||||
|
src_expr = expr_file_line (
|
||||||
|
new_address_expr (get_type (src_expr), src_expr, 0),
|
||||||
|
src_expr);
|
||||||
s = lea_statement (src, 0, src_expr);
|
s = lea_statement (src, 0, src_expr);
|
||||||
sblock_add_statement (sblock, s);
|
sblock_add_statement (sblock, s);
|
||||||
src = s->opc;
|
src = s->opc;
|
||||||
|
|
Loading…
Reference in a new issue