OSDN Git Service

* config/ia64/ia64.c (spill_xfmode_operand): Use assign_stack_temp
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jul 2004 03:03:00 +0000 (03:03 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jul 2004 03:03:00 +0000 (03:03 +0000)
        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

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.md

index 4bf082f..cf04490 100644 (file)
@@ -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.
index e631e87..90d4a1f 100644 (file)
@@ -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;
 }
index b185bc8..08a6d6c 100644 (file)
 
   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]);
     }