From 68d22aa55a9a4f491851f37a6a377ed50ea8e292 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 3 Jul 2004 20:03:00 -0700 Subject: [PATCH] ia64.c (spill_xfmode_operand): Use assign_stack_temp instead of gen_mem_addressof. * 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. From-SVN: r84071 --- gcc/ChangeLog | 7 +++++++ gcc/config/ia64/ia64.c | 13 ++++++------- gcc/config/ia64/ia64.md | 18 +++++++++++++++++- 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,3 +1,10 @@ +2004-07-03 Richard Henderson + + * 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 PR tree-optimization/16341 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]); } -- 2.30.2