public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed, 6/7] MIPS -mcode-readable support
@ 2007-08-08 15:45 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2007-08-08 15:45 UTC (permalink / raw)
  To: gcc-patches

This is the sixth patch in the -mcode-readable series.

We now have a situation where the result of force_const_mem is not
always a legitimate MEM for MIPS16.  Several bits of the MIPS backend
(such as the prologue expanders) call emit_move_insn after reload
and expect emit_move_insn to force illegitimate constants into the
constant pool.  However, emit_move_insn cannot cope (and cannot
reasonably cope) with cases where both the result of force_const_mem
is not legitimate and no new pseudos are allowed.  Only the MIPS
move expanders know how to deal with this.  We should therefore
use emit_move_insn_1 rather than emit_move_insn in this situation.

Rather than change some calls to emit_move_insn_1 and leave others be,
I thought it would be better to have a mips_emit_move function that
automatically picks the right one.  The patch below does this and
replaces all emit_move_insn calls.

Tested in the same way as the first patch and applied.

Richard


gcc/
	* config/mips/mips-protos.h (mips_emit_move): Declare.
	* config/mips/mips.c (mips_emit_move): New function.
	(mips_force_temporary): Use mips_emit_move instead of emit_move_insn.
	(mips_legitimize_const_move): Likewise.
	(mips_legitimize_move): Likewise.
	(mips_split_64bit_move): Likewise.
	(mips_restore_gp): Likewise.
	(mips_load_call_address): Likewise.
	(mips_emit_fcc_reload): Likewise.
	(mips_set_return_address): Likewise.
	(mips_block_move_straight): Likewise.
	(mips_block_move_loop): Likewise.
	(mips_setup_incoming_varargs): Likewise.
	(mips_save_reg): Likewise.
	(mips_expand_prologue): Likewise.
	(mips_restore_reg): Likewise.
	(mips_expand_epilogue): Likewise.
	(mips_output_mi_thunk): Likewise.
	(build_mips16_call_stub): Likewise.
	(mips_builtin_branch_and_move): Likewise.
	* config/mips/mips.h (INITIALIZE_TRAMPOLINE): Likewise.
	* config/mips/mips.md (fixuns_truncdfsi2): Likewise.
	(fixuns_truncdfdi2): Likewise.
	(fixuns_truncsfsi2): Likewise.
	(fixuns_truncsfdi2): Likewise.
	(loadgp_absolute): Likewise.
	(builtin_setjmp_setup): Likewise.
	(builtin_longjmp): Likewise.
	(untyped_call): Likewise.

Index: gcc/config/mips/mips-protos.h
===================================================================
--- gcc/config/mips/mips-protos.h	2007-07-28 12:48:31.000000000 -0700
+++ gcc/config/mips/mips-protos.h	2007-07-28 12:58:19.000000000 -0700
@@ -172,6 +172,7 @@ extern int mips_idiv_insns (void);
 extern int fp_register_operand (rtx, enum machine_mode);
 extern int lo_operand (rtx, enum machine_mode);
 extern bool mips_legitimate_address_p (enum machine_mode, rtx, int);
+extern rtx mips_emit_move (rtx, rtx);
 extern bool mips_split_symbol (rtx, rtx, enum machine_mode, rtx *);
 extern rtx mips_unspec_address (rtx, enum mips_symbol_type);
 extern bool mips_legitimize_address (rtx *, enum machine_mode);
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2007-07-28 12:53:22.000000000 -0700
+++ gcc/config/mips/mips.c	2007-07-28 12:57:57.000000000 -0700
@@ -2097,6 +2097,19 @@ mips_legitimate_address_p (enum machine_
   return mips_classify_address (&addr, x, mode, strict);
 }
 
+/* Emit a move from SRC to DEST.  Assume that the move expanders can
+   handle all moves if !can_create_pseudo_p ().  The distinction is
+   important because, unlike emit_move_insn, the move expanders know
+   how to force Pmode objects into the constant pool even when the
+   constant pool address is not itself legitimate.  */
+
+rtx
+mips_emit_move (rtx dest, rtx src)
+{
+  return (can_create_pseudo_p ()
+	  ? emit_move_insn (dest, src)
+	  : emit_move_insn_1 (dest, src));
+}
 
 /* Copy VALUE to a register and return that register.  If new psuedos
    are allowed, copy it into a new register, otherwise use DEST.  */
@@ -2108,7 +2121,7 @@ mips_force_temporary (rtx dest, rtx valu
     return force_reg (Pmode, value);
   else
     {
-      emit_move_insn (copy_rtx (dest), value);
+      mips_emit_move (copy_rtx (dest), value);
       return dest;
     }
 }
@@ -2530,7 +2543,7 @@ mips_legitimize_const_move (enum machine
 
   if (mips_tls_operand_p (src))
     {
-      emit_move_insn (dest, mips_legitimize_tls_address (src));
+      mips_emit_move (dest, mips_legitimize_tls_address (src));
       return;
     }
 
@@ -2543,7 +2556,7 @@ mips_legitimize_const_move (enum machine
       && (can_create_pseudo_p () || SMALL_INT (offset)))
     {
       base = mips_force_temporary (dest, base);
-      emit_move_insn (dest, mips_add_offset (0, base, INTVAL (offset)));
+      mips_emit_move (dest, mips_add_offset (0, base, INTVAL (offset)));
       return;
     }
 
@@ -2552,7 +2565,7 @@ mips_legitimize_const_move (enum machine
   /* When using explicit relocs, constant pool references are sometimes
      not legitimate addresses.  */
   mips_split_symbol (dest, XEXP (src, 0), mode, &XEXP (src, 0));
-  emit_move_insn (dest, src);
+  mips_emit_move (dest, src);
 }
 
 
@@ -2564,7 +2577,7 @@ mips_legitimize_move (enum machine_mode 
 {
   if (!register_operand (dest, mode) && !reg_or_0_operand (src, mode))
     {
-      emit_move_insn (dest, force_reg (mode, src));
+      mips_emit_move (dest, force_reg (mode, src));
       return true;
     }
 
@@ -3078,12 +3091,12 @@ mips_split_64bit_move (rtx dest, rtx src
       if (ISA_HAS_MXHC1)
 	{
 	  src = gen_lowpart (DFmode, src);
-	  emit_move_insn (mips_subword (dest, 0), mips_subword (src, 0));
+	  mips_emit_move (mips_subword (dest, 0), mips_subword (src, 0));
 	  emit_insn (gen_mfhc1 (mips_subword (dest, 1), src));
 	}
       else
 	{
-	  emit_move_insn (mips_subword (dest, 0), mips_subword (src, 0));
+	  mips_emit_move (mips_subword (dest, 0), mips_subword (src, 0));
 	  emit_insn (gen_store_df_high (mips_subword (dest, 1), src));
 	}
     }
@@ -3097,13 +3110,13 @@ mips_split_64bit_move (rtx dest, rtx src
       if (REG_P (low_dest)
 	  && reg_overlap_mentioned_p (low_dest, src))
 	{
-	  emit_move_insn (mips_subword (dest, 1), mips_subword (src, 1));
-	  emit_move_insn (low_dest, mips_subword (src, 0));
+	  mips_emit_move (mips_subword (dest, 1), mips_subword (src, 1));
+	  mips_emit_move (low_dest, mips_subword (src, 0));
 	}
       else
 	{
-	  emit_move_insn (low_dest, mips_subword (src, 0));
-	  emit_move_insn (mips_subword (dest, 1), mips_subword (src, 1));
+	  mips_emit_move (low_dest, mips_subword (src, 0));
+	  mips_emit_move (mips_subword (dest, 1), mips_subword (src, 1));
 	}
     }
 }
@@ -3264,7 +3277,7 @@ mips_restore_gp (void)
 			     current_function_outgoing_args_size);
   slot = gen_rtx_MEM (Pmode, address);
 
-  emit_move_insn (pic_offset_table_rtx, slot);
+  mips_emit_move (pic_offset_table_rtx, slot);
   if (!TARGET_EXPLICIT_RELOCS)
     emit_insn (gen_blockage ());
 }
@@ -3653,7 +3666,7 @@ mips_load_call_address (rtx dest, rtx ad
 	emit_insn (gen_load_calldi (dest, high, lo_sum_symbol));
     }
   else
-    emit_move_insn (dest, addr);
+    mips_emit_move (dest, addr);
 }
 
 
@@ -3743,8 +3756,8 @@ mips_emit_fcc_reload (rtx dest, rtx src,
   fp1 = gen_rtx_REG (SFmode, REGNO (scratch));
   fp2 = gen_rtx_REG (SFmode, REGNO (scratch) + MAX_FPRS_PER_FMT);
 
-  emit_move_insn (copy_rtx (fp1), src);
-  emit_move_insn (copy_rtx (fp2), CONST0_RTX (SFmode));
+  mips_emit_move (copy_rtx (fp1), src);
+  mips_emit_move (copy_rtx (fp2), CONST0_RTX (SFmode));
   emit_insn (gen_slt_sf (dest, fp2, fp1));
 }
 \f
@@ -3762,7 +3775,7 @@ mips_set_return_address (rtx address, rt
   slot_address = mips_add_offset (scratch, stack_pointer_rtx,
 				  cfun->machine->frame.gp_sp_offset);
 
-  emit_move_insn (gen_rtx_MEM (GET_MODE (address), slot_address), address);
+  mips_emit_move (gen_rtx_MEM (GET_MODE (address), slot_address), address);
 }
 \f
 /* Emit straight-line code to move LENGTH bytes from SRC to DEST.
@@ -3800,7 +3813,7 @@ mips_block_move_straight (rtx dest, rtx 
     {
       regs[i] = gen_reg_rtx (mode);
       if (MEM_ALIGN (src) >= bits)
-	emit_move_insn (regs[i], adjust_address (src, mode, offset));
+	mips_emit_move (regs[i], adjust_address (src, mode, offset));
       else
 	{
 	  rtx part = adjust_address (src, BLKmode, offset);
@@ -3812,7 +3825,7 @@ mips_block_move_straight (rtx dest, rtx 
   /* Copy the chunks to the destination.  */
   for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
     if (MEM_ALIGN (dest) >= bits)
-      emit_move_insn (adjust_address (dest, mode, offset), regs[i]);
+      mips_emit_move (adjust_address (dest, mode, offset), regs[i]);
     else
       {
 	rtx part = adjust_address (dest, BLKmode, offset);
@@ -3885,8 +3898,8 @@ mips_block_move_loop (rtx dest, rtx src,
   mips_block_move_straight (dest, src, MAX_MOVE_BYTES);
 
   /* Move on to the next block.  */
-  emit_move_insn (src_reg, plus_constant (src_reg, MAX_MOVE_BYTES));
-  emit_move_insn (dest_reg, plus_constant (dest_reg, MAX_MOVE_BYTES));
+  mips_emit_move (src_reg, plus_constant (src_reg, MAX_MOVE_BYTES));
+  mips_emit_move (dest_reg, plus_constant (dest_reg, MAX_MOVE_BYTES));
 
   /* Emit the loop condition.  */
   if (Pmode == DImode)
@@ -4409,7 +4422,7 @@ mips_setup_incoming_varargs (CUMULATIVE_
 	      ptr = plus_constant (virtual_incoming_args_rtx, off);
 	      mem = gen_rtx_MEM (mode, ptr);
 	      set_mem_alias_set (mem, get_varargs_alias_set ());
-	      emit_move_insn (mem, gen_rtx_REG (mode, FP_ARG_FIRST + i));
+	      mips_emit_move (mem, gen_rtx_REG (mode, FP_ARG_FIRST + i));
 	      off += UNITS_PER_HWFPVALUE;
 	    }
 	}
@@ -7257,7 +7270,7 @@ mips_save_reg (rtx reg, rtx mem)
       if (mips_split_64bit_move_p (mem, reg))
 	mips_split_64bit_move (mem, reg);
       else
-	emit_move_insn (mem, reg);
+	mips_emit_move (mem, reg);
 
       x1 = mips_frame_set (mips_subword (mem, 0), mips_subword (reg, 0));
       x2 = mips_frame_set (mips_subword (mem, 1), mips_subword (reg, 1));
@@ -7272,11 +7285,11 @@ mips_save_reg (rtx reg, rtx mem)
 	  /* Save a non-mips16 register by moving it through a temporary.
 	     We don't need to do this for $31 since there's a special
 	     instruction for it.  */
-	  emit_move_insn (MIPS_PROLOGUE_TEMP (GET_MODE (reg)), reg);
-	  emit_move_insn (mem, MIPS_PROLOGUE_TEMP (GET_MODE (reg)));
+	  mips_emit_move (MIPS_PROLOGUE_TEMP (GET_MODE (reg)), reg);
+	  mips_emit_move (mem, MIPS_PROLOGUE_TEMP (GET_MODE (reg)));
 	}
       else
-	emit_move_insn (mem, reg);
+	mips_emit_move (mem, reg);
 
       mips_set_frame_expr (mips_frame_set (mem, reg));
     }
@@ -7746,7 +7759,7 @@ mips_expand_prologue (void)
 						       GEN_INT (-size)))) = 1;
       else
 	{
-	  emit_move_insn (MIPS_PROLOGUE_TEMP (Pmode), GEN_INT (size));
+	  mips_emit_move (MIPS_PROLOGUE_TEMP (Pmode), GEN_INT (size));
 	  if (TARGET_MIPS16)
 	    {
 	      /* There are no instructions to add or subtract registers
@@ -7754,11 +7767,11 @@ mips_expand_prologue (void)
 		 temporary.  We should always be using a frame pointer
 		 in this case anyway.  */
 	      gcc_assert (frame_pointer_needed);
-	      emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx);
+	      mips_emit_move (hard_frame_pointer_rtx, stack_pointer_rtx);
 	      emit_insn (gen_sub3_insn (hard_frame_pointer_rtx,
 					hard_frame_pointer_rtx,
 					MIPS_PROLOGUE_TEMP (Pmode)));
-	      emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
+	      mips_emit_move (stack_pointer_rtx, hard_frame_pointer_rtx);
 	    }
 	  else
 	    emit_insn (gen_sub3_insn (stack_pointer_rtx,
@@ -7788,8 +7801,8 @@ mips_expand_prologue (void)
 					 offset))) = 1;
 	  else
 	    {
-	      emit_move_insn (MIPS_PROLOGUE_TEMP (Pmode), offset);
-	      emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx);
+	      mips_emit_move (MIPS_PROLOGUE_TEMP (Pmode), offset);
+	      mips_emit_move (hard_frame_pointer_rtx, stack_pointer_rtx);
 	      emit_insn (gen_add3_insn (hard_frame_pointer_rtx,
 					hard_frame_pointer_rtx,
 					MIPS_PROLOGUE_TEMP (Pmode)));
@@ -7800,7 +7813,7 @@ mips_expand_prologue (void)
 	    }
 	}
       else
-	RTX_FRAME_RELATED_P (emit_move_insn (hard_frame_pointer_rtx,
+	RTX_FRAME_RELATED_P (mips_emit_move (hard_frame_pointer_rtx,
 					     stack_pointer_rtx)) = 1;
     }
 
@@ -7865,11 +7878,11 @@ mips_restore_reg (rtx reg, rtx mem)
   if (TARGET_MIPS16 && !M16_REG_P (REGNO (reg)))
     {
       /* Can't restore directly; move through a temporary.  */
-      emit_move_insn (MIPS_EPILOGUE_TEMP (GET_MODE (reg)), mem);
-      emit_move_insn (reg, MIPS_EPILOGUE_TEMP (GET_MODE (reg)));
+      mips_emit_move (MIPS_EPILOGUE_TEMP (GET_MODE (reg)), mem);
+      mips_emit_move (reg, MIPS_EPILOGUE_TEMP (GET_MODE (reg)));
     }
   else
-    emit_move_insn (reg, mem);
+    mips_emit_move (reg, mem);
 }
 
 
@@ -7953,7 +7966,7 @@ mips_expand_epilogue (int sibcall_p)
       adjust = GEN_INT (step1);
       if (!SMALL_OPERAND (step1))
 	{
-	  emit_move_insn (MIPS_EPILOGUE_TEMP (Pmode), adjust);
+	  mips_emit_move (MIPS_EPILOGUE_TEMP (Pmode), adjust);
 	  adjust = MIPS_EPILOGUE_TEMP (Pmode);
 	}
 
@@ -7966,7 +7979,7 @@ mips_expand_epilogue (int sibcall_p)
 
   /* Copy TARGET into the stack pointer.  */
   if (target != stack_pointer_rtx)
-    emit_move_insn (stack_pointer_rtx, target);
+    mips_emit_move (stack_pointer_rtx, target);
 
   /* If we're using addressing macros, $gp is implicitly used by all
      SYMBOL_REFs.  We must emit a blockage insn before restoring $gp
@@ -8015,11 +8028,11 @@ mips_expand_epilogue (int sibcall_p)
     {
       if (TARGET_MIPS16)
 	{
-	  emit_move_insn (MIPS_EPILOGUE_TEMP (Pmode), stack_pointer_rtx);
+	  mips_emit_move (MIPS_EPILOGUE_TEMP (Pmode), stack_pointer_rtx);
 	  emit_insn (gen_add3_insn (MIPS_EPILOGUE_TEMP (Pmode),
 				    MIPS_EPILOGUE_TEMP (Pmode),
 				    EH_RETURN_STACKADJ_RTX));
-	  emit_move_insn (stack_pointer_rtx, MIPS_EPILOGUE_TEMP (Pmode));
+	  mips_emit_move (stack_pointer_rtx, MIPS_EPILOGUE_TEMP (Pmode));
 	}
       else
 	emit_insn (gen_add3_insn (stack_pointer_rtx,
@@ -8117,7 +8130,7 @@ mips_output_mi_thunk (FILE *file, tree t
       rtx offset = GEN_INT (delta);
       if (!SMALL_OPERAND (delta))
 	{
-	  emit_move_insn (temp1, offset);
+	  mips_emit_move (temp1, offset);
 	  offset = temp1;
 	}
       emit_insn (gen_add3_insn (this, this, offset));
@@ -8129,13 +8142,13 @@ mips_output_mi_thunk (FILE *file, tree t
       rtx addr;
 
       /* Set TEMP1 to *THIS.  */
-      emit_move_insn (temp1, gen_rtx_MEM (Pmode, this));
+      mips_emit_move (temp1, gen_rtx_MEM (Pmode, this));
 
       /* Set ADDR to a legitimate address for *THIS + VCALL_OFFSET.  */
       addr = mips_add_offset (temp2, temp1, vcall_offset);
 
       /* Load the offset and add it to THIS.  */
-      emit_move_insn (temp1, gen_rtx_MEM (Pmode, addr));
+      mips_emit_move (temp1, gen_rtx_MEM (Pmode, addr));
       emit_insn (gen_add3_insn (this, this, temp1));
     }
 
@@ -8163,7 +8176,7 @@ mips_output_mi_thunk (FILE *file, tree t
 
       if (TARGET_USE_PIC_FN_ADDR_REG
 	  && REGNO (temp1) != PIC_FUNCTION_ADDR_REGNUM)
-	emit_move_insn (gen_rtx_REG (Pmode, PIC_FUNCTION_ADDR_REGNUM), temp1);
+	mips_emit_move (gen_rtx_REG (Pmode, PIC_FUNCTION_ADDR_REGNUM), temp1);
       emit_jump_insn (gen_indirect_jump (temp1));
     }
   else
@@ -9124,7 +9137,7 @@ build_mips16_call_stub (rtx retval, rtx 
       id = get_identifier (buf);
       stub_fn = gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (id));
 
-      emit_move_insn (gen_rtx_REG (Pmode, 2), fn);
+      mips_emit_move (gen_rtx_REG (Pmode, 2), fn);
 
       if (retval == NULL_RTX)
 	insn = gen_call_internal (stub_fn, arg_size);
@@ -11847,7 +11860,7 @@ mips_builtin_branch_and_move (rtx condit
   done_label = gen_label_rtx ();
 
   /* First assume that CONDITION is false.  */
-  emit_move_insn (target, value_if_false);
+  mips_emit_move (target, value_if_false);
 
   /* Branch to TRUE_LABEL if CONDITION is true and DONE_LABEL otherwise.  */
   emit_jump_insn (gen_condjump (condition, true_label));
@@ -11856,7 +11869,7 @@ mips_builtin_branch_and_move (rtx condit
 
   /* Fix TARGET if CONDITION is true.  */
   emit_label (true_label);
-  emit_move_insn (target, value_if_true);
+  mips_emit_move (target, value_if_true);
 
   emit_label (done_label);
   return target;
Index: gcc/config/mips/mips.h
===================================================================
--- gcc/config/mips/mips.h	2007-07-28 12:30:41.000000000 -0700
+++ gcc/config/mips/mips.h	2007-07-28 12:57:57.000000000 -0700
@@ -2138,8 +2138,8 @@ #define INITIALIZE_TRAMPOLINE(ADDR, FUNC
 									    \
   func_addr = plus_constant (ADDR, 32);					    \
   chain_addr = plus_constant (func_addr, GET_MODE_SIZE (ptr_mode));	    \
-  emit_move_insn (gen_rtx_MEM (ptr_mode, func_addr), FUNC);		    \
-  emit_move_insn (gen_rtx_MEM (ptr_mode, chain_addr), CHAIN);		    \
+  mips_emit_move (gen_rtx_MEM (ptr_mode, func_addr), FUNC);		    \
+  mips_emit_move (gen_rtx_MEM (ptr_mode, chain_addr), CHAIN);		    \
   end_addr = gen_reg_rtx (Pmode);					    \
   emit_insn (gen_add3_insn (end_addr, copy_rtx (ADDR),			    \
                             GEN_INT (TRAMPOLINE_SIZE)));		    \
Index: gcc/config/mips/mips.md
===================================================================
--- gcc/config/mips/mips.md	2007-07-28 12:50:30.000000000 -0700
+++ gcc/config/mips/mips.md	2007-07-28 12:57:57.000000000 -0700
@@ -2792,7 +2792,7 @@ (define_expand "fixuns_truncdfsi2"
 
   if (reg1)			/* Turn off complaints about unreached code.  */
     {
-      emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode));
+      mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode));
       do_pending_stack_adjust ();
 
       emit_insn (gen_cmpdf (operands[1], reg1));
@@ -2804,8 +2804,8 @@ (define_expand "fixuns_truncdfsi2"
       emit_barrier ();
 
       emit_label (label1);
-      emit_move_insn (reg2, gen_rtx_MINUS (DFmode, operands[1], reg1));
-      emit_move_insn (reg3, GEN_INT (trunc_int_for_mode
+      mips_emit_move (reg2, gen_rtx_MINUS (DFmode, operands[1], reg1));
+      mips_emit_move (reg3, GEN_INT (trunc_int_for_mode
 				     (BITMASK_HIGH, SImode)));
 
       emit_insn (gen_fix_truncdfsi2 (operands[0], reg2));
@@ -2835,7 +2835,7 @@ (define_expand "fixuns_truncdfdi2"
 
   real_2expN (&offset, 63);
 
-  emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode));
+  mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode));
   do_pending_stack_adjust ();
 
   emit_insn (gen_cmpdf (operands[1], reg1));
@@ -2847,8 +2847,8 @@ (define_expand "fixuns_truncdfdi2"
   emit_barrier ();
 
   emit_label (label1);
-  emit_move_insn (reg2, gen_rtx_MINUS (DFmode, operands[1], reg1));
-  emit_move_insn (reg3, GEN_INT (BITMASK_HIGH));
+  mips_emit_move (reg2, gen_rtx_MINUS (DFmode, operands[1], reg1));
+  mips_emit_move (reg3, GEN_INT (BITMASK_HIGH));
   emit_insn (gen_ashldi3 (reg3, reg3, GEN_INT (32)));
 
   emit_insn (gen_fix_truncdfdi2 (operands[0], reg2));
@@ -2877,7 +2877,7 @@ (define_expand "fixuns_truncsfsi2"
 
   real_2expN (&offset, 31);
 
-  emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode));
+  mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode));
   do_pending_stack_adjust ();
 
   emit_insn (gen_cmpsf (operands[1], reg1));
@@ -2889,8 +2889,8 @@ (define_expand "fixuns_truncsfsi2"
   emit_barrier ();
 
   emit_label (label1);
-  emit_move_insn (reg2, gen_rtx_MINUS (SFmode, operands[1], reg1));
-  emit_move_insn (reg3, GEN_INT (trunc_int_for_mode
+  mips_emit_move (reg2, gen_rtx_MINUS (SFmode, operands[1], reg1));
+  mips_emit_move (reg3, GEN_INT (trunc_int_for_mode
 				 (BITMASK_HIGH, SImode)));
 
   emit_insn (gen_fix_truncsfsi2 (operands[0], reg2));
@@ -2919,7 +2919,7 @@ (define_expand "fixuns_truncsfdi2"
 
   real_2expN (&offset, 63);
 
-  emit_move_insn (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode));
+  mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode));
   do_pending_stack_adjust ();
 
   emit_insn (gen_cmpsf (operands[1], reg1));
@@ -2931,8 +2931,8 @@ (define_expand "fixuns_truncsfdi2"
   emit_barrier ();
 
   emit_label (label1);
-  emit_move_insn (reg2, gen_rtx_MINUS (SFmode, operands[1], reg1));
-  emit_move_insn (reg3, GEN_INT (BITMASK_HIGH));
+  mips_emit_move (reg2, gen_rtx_MINUS (SFmode, operands[1], reg1));
+  mips_emit_move (reg3, GEN_INT (BITMASK_HIGH));
   emit_insn (gen_ashldi3 (reg3, reg3, GEN_INT (32)));
 
   emit_insn (gen_fix_truncsfdi2 (operands[0], reg2));
@@ -4146,7 +4146,7 @@ (define_insn_and_split "loadgp_absolute"
   ""
   [(const_int 0)]
 {
-  emit_move_insn (pic_offset_table_rtx, operands[0]);
+  mips_emit_move (pic_offset_table_rtx, operands[0]);
   DONE;
 }
   [(set_attr "length" "8")])
@@ -5094,7 +5094,7 @@ (define_expand "builtin_setjmp_setup"
   rtx addr;
 
   addr = plus_constant (operands[0], GET_MODE_SIZE (Pmode) * 3);
-  emit_move_insn (gen_rtx_MEM (Pmode, addr), pic_offset_table_rtx);
+  mips_emit_move (gen_rtx_MEM (Pmode, addr), pic_offset_table_rtx);
   DONE;
 })
 
@@ -5120,10 +5120,10 @@ (define_expand "builtin_longjmp"
 
   /* This bit is similar to expand_builtin_longjmp except that it
      restores $gp as well.  */
-  emit_move_insn (hard_frame_pointer_rtx, fp);
-  emit_move_insn (pv, lab);
+  mips_emit_move (hard_frame_pointer_rtx, fp);
+  mips_emit_move (pv, lab);
   emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX);
-  emit_move_insn (gp, gpv);
+  mips_emit_move (gp, gpv);
   emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
   emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
   emit_insn (gen_rtx_USE (VOIDmode, gp));
@@ -5514,7 +5514,7 @@ (define_expand "untyped_call"
   for (i = 0; i < XVECLEN (operands[2], 0); i++)
     {
       rtx set = XVECEXP (operands[2], 0, i);
-      emit_move_insn (SET_DEST (set), SET_SRC (set));
+      mips_emit_move (SET_DEST (set), SET_SRC (set));
     }
 
   emit_insn (gen_blockage ());

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-08 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08 15:45 [committed, 6/7] MIPS -mcode-readable support Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).