Directly generate MOVEP for variable destination pointers.

When the destination pointer is variable, the MOVEP node will not have any
identifiers attached to it, so generate_moveps must not be used.
This commit is contained in:
Bill Currie 2012-12-20 21:28:34 +09:00
parent 7b1850917d
commit 6c2d0b04d3

View file

@ -856,11 +856,16 @@ dag_gencode (dag_t *dag, sblock_t *block, dagnode_t *dagnode)
dst = operands[0];
break;
case st_move:
if (!strcmp (dagnode->label->opcode, "<MOVE>"))
if (!strcmp (dagnode->label->opcode, "<MOVE>")) {
dst = generate_moves (dag, block, dagnode);
if (!strcmp (dagnode->label->opcode, "<MOVEP>"))
break;
}
if (!strcmp (dagnode->label->opcode, "<MOVEP>")
&& !dagnode->children[2]) {
dst = generate_moveps (dag, block, dagnode);
break;
break;
}
//fall through
case st_state:
case st_func:
for (i = 0; i < 3; i++)