mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qfcc] Build movep dest pointer correctly
This fixes the mangled pointer in struct-init-param.r.
This commit is contained in:
parent
5020966be3
commit
bcf75b541a
1 changed files with 8 additions and 1 deletions
|
@ -867,6 +867,8 @@ generate_moveps (dag_t *dag, sblock_t *block, dagnode_t *dagnode)
|
|||
statement_t *st;
|
||||
operand_t *dst = 0;
|
||||
type_t *type;
|
||||
int offset = 0;
|
||||
def_t *dstDef;
|
||||
|
||||
operands[0] = make_operand (dag, block, dagnode, 0);
|
||||
operands[1] = make_operand (dag, block, dagnode, 1);
|
||||
|
@ -875,7 +877,12 @@ generate_moveps (dag_t *dag, sblock_t *block, dagnode_t *dagnode)
|
|||
var = dag->labels[var_iter->element];
|
||||
dst = var->op;
|
||||
type = dst->o.def->type;
|
||||
operands[2] = value_operand (new_pointer_val (0, type, dst->o.def));
|
||||
dstDef = dst->o.def;
|
||||
if (dstDef->alias) {
|
||||
offset = dstDef->offset;
|
||||
dstDef = dstDef->alias;
|
||||
}
|
||||
operands[2] = value_operand (new_pointer_val (offset, type, dstDef));
|
||||
st = build_statement ("<MOVEP>", operands, var->expr);
|
||||
sblock_add_statement (block, st);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue