Small patch for complex moves
Bernd Schmidt
crux@pool.informatik.rwth-aachen.de
Fri Feb 20 10:10:00 GMT 1998
Here's a small patch that makes the compiler handle complex values like
any other multi-register values when moving them. This causes better flow
information to be generated. Previously, when returning a complex float on
the i386, the compiler used to think that eax and edx, which contain the
return value, are live throughout the function.
Bernd
* expr.c (emit_move_insn_1): When moving complex values in several
steps, emit a CLOBBER to show the destination dies.
Index: expr.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/expr.c,v
retrieving revision 1.1.3.20
diff -p -r1.1.3.20 expr.c
*** expr.c 1998/02/16 19:03:51 1.1.3.20
--- expr.c 1998/02/19 12:10:17
*************** emit_move_insn_1 (x, y)
*** 2255,2260 ****
--- 2255,2264 ----
}
else
{
+ /* Show the output dies here. */
+ if (x != y)
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+
emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
(gen_realpart (submode, x), gen_realpart (submode, y)));
emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
More information about the Gcc
mailing list