This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PowerPC {save,restore}_stack_nonlocal cleanup


	The previous patch to these functions explicitly computed a mode
that is equivalent to Pmode in all cases, so just use Pmode.  TARGET_64BIT
requires TARGET_POWERPC64, so word_mode always will be DImode in that
case.

David


	* config/rs6000/rs6000.md (save_stack_nonlocal): Use Pmode instead
	of computing wmode.
	(restore_stack_nonlocal): Same.

Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.288
diff -c -p -r1.288 rs6000.md
*** rs6000.md	26 Jan 2004 17:38:51 -0000	1.288
--- rs6000.md	27 Jan 2004 21:00:14 -0000
***************
*** 9899,9910 ****
  {
    rtx temp = gen_reg_rtx (Pmode);
    int units_per_word = (TARGET_32BIT) ? 4 : 8;
-   enum machine_mode wmode = (TARGET_32BIT) ? SImode : word_mode;
  
    /* Copy the backchain to the first word, sp to the second.  */
    emit_move_insn (temp, gen_rtx_MEM (Pmode, operands[1]));
!   emit_move_insn (adjust_address_nv (operands[0], wmode, 0), temp);
!   emit_move_insn (adjust_address_nv (operands[0], wmode, units_per_word),
  		  operands[1]);
    DONE;
  }")
--- 9899,9909 ----
  {
    rtx temp = gen_reg_rtx (Pmode);
    int units_per_word = (TARGET_32BIT) ? 4 : 8;
  
    /* Copy the backchain to the first word, sp to the second.  */
    emit_move_insn (temp, gen_rtx_MEM (Pmode, operands[1]));
!   emit_move_insn (adjust_address_nv (operands[0], Pmode, 0), temp);
!   emit_move_insn (adjust_address_nv (operands[0], Pmode, units_per_word),
  		  operands[1]);
    DONE;
  }")
***************
*** 9917,9929 ****
  {
    rtx temp = gen_reg_rtx (Pmode);
    int units_per_word = (TARGET_32BIT) ? 4 : 8;
-   enum machine_mode wmode = (TARGET_32BIT) ? SImode : word_mode;
  
    /* Restore the backchain from the first word, sp from the second.  */
    emit_move_insn (temp,
! 		  adjust_address_nv (operands[1], wmode, 0));
    emit_move_insn (operands[0],
! 		  adjust_address_nv (operands[1], wmode, units_per_word));
    emit_move_insn (gen_rtx_MEM (Pmode, operands[0]), temp);
    DONE;
  }")
--- 9916,9927 ----
  {
    rtx temp = gen_reg_rtx (Pmode);
    int units_per_word = (TARGET_32BIT) ? 4 : 8;
  
    /* Restore the backchain from the first word, sp from the second.  */
    emit_move_insn (temp,
! 		  adjust_address_nv (operands[1], Pmode, 0));
    emit_move_insn (operands[0],
! 		  adjust_address_nv (operands[1], Pmode, units_per_word));
    emit_move_insn (gen_rtx_MEM (Pmode, operands[0]), temp);
    DONE;
  }")


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]