summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-04 03:03:00 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-04 03:03:00 +0000
commit3f56a1abd3114c6a4d08bd7602b88c7d4170b1f2 (patch)
tree73a30a6dcffb59862e4d2223eb5401f1705817cf
parentf105beb6e1491b41507146aae95e4dfc561eba1d (diff)
downloadgcc-3f56a1abd3114c6a4d08bd7602b88c7d4170b1f2.tar.gz
* config/ia64/ia64.c (spill_xfmode_operand): Use assign_stack_temp
instead of gen_mem_addressof. * config/ia64/ia64.md (movxf): Use assign_stack_temp to handle TImode output register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84071 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/ia64/ia64.c13
-rw-r--r--gcc/config/ia64/ia64.md18
3 files changed, 30 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4bf082f1a70..cf04490f855 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2004-07-03 Richard Henderson <rth@redhat.com>
+ * config/ia64/ia64.c (spill_xfmode_operand): Use assign_stack_temp
+ instead of gen_mem_addressof.
+ * config/ia64/ia64.md (movxf): Use assign_stack_temp to handle
+ TImode output register.
+
+2004-07-03 Richard Henderson <rth@redhat.com>
+
PR tree-optimization/16341
* tree-sra.c (sra_walk_function): Increment to next stmt before
processing the current stmt.
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index e631e87cdda..90d4a1f9302 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -1640,17 +1640,16 @@ spill_xfmode_operand (rtx in, int force)
&& GET_MODE (SUBREG_REG (in)) == TImode
&& GET_CODE (SUBREG_REG (in)) == REG)
{
- rtx mem = gen_mem_addressof (SUBREG_REG (in), NULL_TREE, /*rescan=*/true);
- return gen_rtx_MEM (XFmode, copy_to_reg (XEXP (mem, 0)));
+ rtx memt = assign_stack_temp (TImode, 16, 0);
+ emit_move_insn (memt, SUBREG_REG (in));
+ return adjust_address (memt, XFmode, 0);
}
else if (force && GET_CODE (in) == REG)
{
- rtx mem = gen_mem_addressof (in, NULL_TREE, /*rescan=*/true);
- return gen_rtx_MEM (XFmode, copy_to_reg (XEXP (mem, 0)));
+ rtx memx = assign_stack_temp (XFmode, 16, 0);
+ emit_move_insn (memx, in);
+ return memx;
}
- else if (GET_CODE (in) == MEM
- && GET_CODE (XEXP (in, 0)) == ADDRESSOF)
- return change_address (in, XFmode, copy_to_reg (XEXP (in, 0)));
else
return in;
}
diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md
index b185bc82059..08a6d6c059c 100644
--- a/gcc/config/ia64/ia64.md
+++ b/gcc/config/ia64/ia64.md
@@ -746,9 +746,25 @@
if (! reload_in_progress && ! reload_completed)
{
- operands[0] = spill_xfmode_operand (operands[0], 0);
operands[1] = spill_xfmode_operand (operands[1], 0);
+ if (GET_MODE (op0) == TImode && GET_CODE (op0) == REG)
+ {
+ rtx memt, memx, in = operands[1];
+ if (CONSTANT_P (in))
+ in = validize_mem (force_const_mem (XFmode, in));
+ if (GET_CODE (in) == MEM)
+ memt = adjust_address (in, TImode, 0);
+ else
+ {
+ memt = assign_stack_temp (TImode, 16, 0);
+ memx = adjust_address (memt, XFmode, 0);
+ emit_move_insn (memx, in);
+ }
+ emit_move_insn (op0, memt);
+ DONE;
+ }
+
if (! ia64_move_ok (operands[0], operands[1]))
operands[1] = force_reg (XFmode, operands[1]);
}