Commit ef7befe0 by Ben Elliston Committed by Ben Elliston

expr.c (emit_move_change_mode): Always adjust addresses, not just during reload.

	* expr.c (emit_move_change_mode): Always adjust addresses, not
	just during reload.  Copy replacements only during reload.
	(emit_move_insn_1): Move MODE_DECIMAL_FLOAT modes by invoking
	emit_move_via_integer.

From-SVN: r109845
parent 96c6b0e2
2006-01-18 Ben Elliston <bje@au.ibm.com>
* expr.c (emit_move_change_mode): Always adjust addresses, not
just during reload. Copy replacements only during reload.
(emit_move_insn_1): Move MODE_DECIMAL_FLOAT modes by invoking
emit_move_via_integer.
2006-01-17 Shantonu Sen <ssen@opendarwin.org> 2006-01-17 Shantonu Sen <ssen@opendarwin.org>
* Makefile.in (check-%, check-consistency): Use $${srcdir} * Makefile.in (check-%, check-consistency): Use $${srcdir}
......
/* Convert tree expression to rtl instructions, for GNU compiler. /* Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
Inc.
This file is part of GCC. This file is part of GCC.
...@@ -2783,19 +2784,21 @@ emit_move_change_mode (enum machine_mode new_mode, ...@@ -2783,19 +2784,21 @@ emit_move_change_mode (enum machine_mode new_mode,
{ {
rtx ret; rtx ret;
if (reload_in_progress && MEM_P (x)) if (MEM_P (x))
{ {
/* We can't use gen_lowpart here because it may call change_address /* We don't have to worry about changing the address since the
which is not appropriate if we were called when a reload was in size in bytes is supposed to be the same. */
progress. We don't have to worry about changing the address since if (reload_in_progress)
the size in bytes is supposed to be the same. Copy the MEM to {
change the mode and move any substitutions from the old MEM to /* Copy the MEM to change the mode and move any
the new one. */ substitutions from the old MEM to the new one. */
ret = adjust_address_nv (x, new_mode, 0); ret = adjust_address_nv (x, new_mode, 0);
copy_replacements (x, ret); copy_replacements (x, ret);
} }
else else
ret = adjust_address (x, new_mode, 0);
}
else
{ {
/* Note that we do want simplify_subreg's behavior of validating /* Note that we do want simplify_subreg's behavior of validating
that the new mode is ok for a hard register. If we were to use that the new mode is ok for a hard register. If we were to use
...@@ -3128,6 +3131,17 @@ emit_move_insn_1 (rtx x, rtx y) ...@@ -3128,6 +3131,17 @@ emit_move_insn_1 (rtx x, rtx y)
if (COMPLEX_MODE_P (mode)) if (COMPLEX_MODE_P (mode))
return emit_move_complex (mode, x, y); return emit_move_complex (mode, x, y);
if (GET_MODE_CLASS (mode) == MODE_DECIMAL_FLOAT)
{
rtx result = emit_move_via_integer (mode, x, y, true);
/* If we can't find an integer mode, use multi words. */
if (result)
return result;
else
return emit_move_multi_word (mode, x, y);
}
if (GET_MODE_CLASS (mode) == MODE_CC) if (GET_MODE_CLASS (mode) == MODE_CC)
return emit_move_ccmode (mode, x, y); return emit_move_ccmode (mode, x, y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment