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]

[PATCH] Simplify preprocessor conditional in push_block


Hi,

Any reason to keep this rather intricate preprocessor conditional

 #ifndef STACK_GROWS_DOWNWARD
   if (0)
 #else
   if (1)
  #endif

in push_block? If the patch is approved, I'll bootstrap it before the commit.


2003-10-06  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* expr.c (push_block): Simply preprocessor conditional.


-- 
Eric Botcazou
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.589
diff -c -p -r1.589 expr.c
*** expr.c	28 Sep 2003 04:56:33 -0000	1.589
--- expr.c	6 Oct 2003 12:21:21 -0000
*************** push_block (rtx size, int extra, int bel
*** 3699,3726 ****
        anti_adjust_stack (temp);
      }
  
! #ifndef STACK_GROWS_DOWNWARD
!   if (0)
  #else
!   if (1)
  #endif
-     {
-       temp = virtual_outgoing_args_rtx;
-       if (extra != 0 && below)
- 	temp = plus_constant (temp, extra);
-     }
-   else
-     {
-       if (GET_CODE (size) == CONST_INT)
- 	temp = plus_constant (virtual_outgoing_args_rtx,
- 			      -INTVAL (size) - (below ? 0 : extra));
-       else if (extra != 0 && !below)
- 	temp = gen_rtx_PLUS (Pmode, virtual_outgoing_args_rtx,
- 			     negate_rtx (Pmode, plus_constant (size, extra)));
-       else
- 	temp = gen_rtx_PLUS (Pmode, virtual_outgoing_args_rtx,
- 			     negate_rtx (Pmode, size));
-     }
  
    return memory_address (GET_CLASS_NARROWEST_MODE (MODE_INT), temp);
  }
--- 3699,3719 ----
        anti_adjust_stack (temp);
      }
  
! #ifdef STACK_GROWS_DOWNWARD
!    temp = virtual_outgoing_args_rtx;
!    if (extra != 0 && below)
!       temp = plus_constant (temp, extra);
  #else
!    if (GET_CODE (size) == CONST_INT)
!       temp = plus_constant (virtual_outgoing_args_rtx,
! 			    -INTVAL (size) - (below ? 0 : extra));
!    else if (extra != 0 && !below)
!       temp = gen_rtx_PLUS (Pmode, virtual_outgoing_args_rtx,
! 			   negate_rtx (Pmode, plus_constant (size, extra)));
!    else
!       temp = gen_rtx_PLUS (Pmode, virtual_outgoing_args_rtx,
! 			   negate_rtx (Pmode, size));
  #endif
  
    return memory_address (GET_CLASS_NARROWEST_MODE (MODE_INT), temp);
  }

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