always define ARGS_GROW_DOWNWARD
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>
Tue, 28 Apr 2015 04:46:20 +0000 (04:46 +0000)
committerTrevor Saunders <tbsaunde@gcc.gnu.org>
Tue, 28 Apr 2015 04:46:20 +0000 (04:46 +0000)
gcc/ChangeLog:

2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* config/pa/pa.h (ARGS_GROW_DOWNWARD): Define to 1.
* defaults.h (ARGS_GROW_DOWNWARD): Define it to 0 by default.
* calls.c (save_fixed_argument_area): Don't chekc if
ARGS_GROW_DOWNWARD is defined.
(restore_fixed_argument_area): Likewise.
(mem_overlaps_already_clobbered_arg_p): Likewise.
(check_sibcall_argument_overlap): Likewise.
(expand_call): Likewise.
(emit_library_call_value_1): Likewise.
(store_one_arg): Likewise.
* function.c (assign_parms): Likewise.
(locate_and_pad_parm): Likewise.
(pad_to_arg_alignment): Likewise.
* targhooks.c (std_gimplify_va_arg_expr): Likewise.

From-SVN: r222507

gcc/ChangeLog
gcc/calls.c
gcc/config/pa/pa.h
gcc/defaults.h
gcc/function.c
gcc/targhooks.c

index 6eeba5fde877db517fc5610ed998ee10cdced049..4ba2540bba9958f18fbecf17554d4e6d39c79a98 100644 (file)
@@ -1,3 +1,20 @@
+2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
+       * config/pa/pa.h (ARGS_GROW_DOWNWARD): Define to 1.
+       * defaults.h (ARGS_GROW_DOWNWARD): Define it to 0 by default.
+       * calls.c (save_fixed_argument_area): Don't chekc if
+       ARGS_GROW_DOWNWARD is defined.
+       (restore_fixed_argument_area): Likewise.
+       (mem_overlaps_already_clobbered_arg_p): Likewise.
+       (check_sibcall_argument_overlap): Likewise.
+       (expand_call): Likewise.
+       (emit_library_call_value_1): Likewise.
+       (store_one_arg): Likewise.
+       * function.c (assign_parms): Likewise.
+       (locate_and_pad_parm): Likewise.
+       (pad_to_arg_alignment): Likewise.
+       * targhooks.c (std_gimplify_va_arg_expr): Likewise.
+
 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
        * defaults.h (gen_epilogue): New function.
index a6cd33b32a96bd51a083a123b081e889b20dd6a9..b17a9f2141debe7bc0e2e2c360a1685a1710475e 100644 (file)
@@ -948,7 +948,7 @@ save_fixed_argument_area (int reg_parm_stack_space, rtx argblock, int *low_to_sa
 
   /* Compute the boundary of the area that needs to be saved, if any.  */
   high = reg_parm_stack_space;
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
   high += 1;
 #endif
   if (high > highest_outgoing_arg_in_use)
@@ -979,7 +979,7 @@ save_fixed_argument_area (int reg_parm_stack_space, rtx argblock, int *low_to_sa
                         BIGGEST_ALIGNMENT / UNITS_PER_WORD) - 1)))
          save_mode = BLKmode;
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
        delta = -high;
 #else
        delta = low;
@@ -1013,7 +1013,7 @@ restore_fixed_argument_area (rtx save_area, rtx argblock, int high_to_save, int
   int delta;
   rtx addr, stack_area;
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
   delta = -high_to_save;
 #else
   delta = low_to_save;
@@ -1980,7 +1980,7 @@ mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size)
   i += crtl->args.pretend_args_size;
 #endif
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
   i = -i - size;
 #endif
   if (size > 0)
@@ -2286,7 +2286,7 @@ check_sibcall_argument_overlap (rtx_insn *insn, struct arg_data *arg,
 
   if (mark_stored_args_map)
     {
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
       low = -arg->locate.slot_offset.constant - arg->locate.size.constant;
 #else
       low = arg->locate.slot_offset.constant;
@@ -2979,7 +2979,7 @@ expand_call (tree exp, rtx target, int ignore)
                  if (! OUTGOING_REG_PARM_STACK_SPACE ((!fndecl ? fntype : TREE_TYPE (fndecl))))
                    needed += reg_parm_stack_space;
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
                  highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use,
                                                     needed + 1);
 #else
@@ -3047,7 +3047,7 @@ expand_call (tree exp, rtx target, int ignore)
                  else
                    {
                      argblock = push_block (GEN_INT (needed), 0, 0);
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
                      argblock = plus_constant (Pmode, argblock, needed);
 #endif
                    }
@@ -4122,7 +4122,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
       if (! OUTGOING_REG_PARM_STACK_SPACE ((!fndecl ? fntype : TREE_TYPE (fndecl))))
        needed += reg_parm_stack_space;
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
       highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use,
                                         needed + 1);
 #else
@@ -4213,7 +4213,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
              /* If this is being stored into a pre-allocated, fixed-size,
                 stack area, save any previous data at that location.  */
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
              /* stack_slot is negative, but we want to index stack_usage_map
                 with positive values.  */
              upper_bound = -argvec[argnum].locate.slot_offset.constant + 1;
@@ -4702,7 +4702,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
         save any previous data at that location.  */
       if (argblock && ! variable_size && arg->stack)
        {
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
          /* stack_slot is negative, but we want to index stack_usage_map
             with positive values.  */
          if (GET_CODE (XEXP (arg->stack_slot, 0)) == PLUS)
index 6c48883d26d8b250cfd8bcb6d1e844132d0eaa7a..f9107bcdbce7753ab9e78e999261393024f32e13 100644 (file)
@@ -490,7 +490,7 @@ extern rtx hppa_pic_save_rtx (void);
 /* #define STACK_GROWS_DOWNWARD */
 
 /* Believe it or not.  */
-#define ARGS_GROW_DOWNWARD
+#define ARGS_GROW_DOWNWARD 1
 
 /* Define this to nonzero if the nominal address of the stack frame
    is at the high-address end of the local variables;
index 4c8719163e2f71e9a9a3b47c2f46a5938a1a28ad..47fdcf45e9ad3220cd91037fc46962273b5b386d 100644 (file)
@@ -1225,6 +1225,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define EPILOGUE_USES(REG) false
 #endif
 
+#ifndef ARGS_GROW_DOWNWARD
+#define ARGS_GROW_DOWNWARD 0
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
index 14afc53c603432d0970e1c8c839e53abe067162e..48e6c69265cb10b5084ef6e0a042a66f7399fb4b 100644 (file)
@@ -3771,7 +3771,7 @@ assign_parms (tree fndecl)
   crtl->args.size = CEIL_ROUND (crtl->args.size,
                                           PARM_BOUNDARY / BITS_PER_UNIT);
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
   crtl->args.arg_offset_rtx
     = (all.stack_args_size.var == 0 ? GEN_INT (-all.stack_args_size.constant)
        : expand_expr (size_diffop (all.stack_args_size.var,
@@ -4070,7 +4070,7 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs,
   if (crtl->preferred_stack_boundary < boundary)
     crtl->preferred_stack_boundary = boundary;
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
   locate->slot_offset.constant = -initial_offset_ptr->constant;
   if (initial_offset_ptr->var)
     locate->slot_offset.var = size_binop (MINUS_EXPR, ssize_int (0),
@@ -4175,7 +4175,7 @@ pad_to_arg_alignment (struct args_size *offset_ptr, int boundary,
          tree offset = size_binop (PLUS_EXPR,
                                    ARGS_SIZE_TREE (*offset_ptr),
                                    sp_offset_tree);
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
          tree rounded = round_down (offset, boundary / BITS_PER_UNIT);
 #else
          tree rounded = round_up   (offset, boundary / BITS_PER_UNIT);
@@ -4191,7 +4191,7 @@ pad_to_arg_alignment (struct args_size *offset_ptr, int boundary,
       else
        {
          offset_ptr->constant = -sp_offset +
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
            FLOOR_ROUND (offset_ptr->constant + sp_offset, boundary_in_bytes);
 #else
            CEIL_ROUND (offset_ptr->constant + sp_offset, boundary_in_bytes);
index 0c141037664f45f391d15bd9c3a98d474c684f80..7f694b62242a8fe58bd7f55028e623508d6a5a87 100644 (file)
@@ -1786,7 +1786,7 @@ std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
   unsigned HOST_WIDE_INT align, boundary;
   bool indirect;
 
-#ifdef ARGS_GROW_DOWNWARD
+#if ARGS_GROW_DOWNWARD
   /* All of the alignment and movement below is for args-grow-up machines.
      As of 2004, there are only 3 ARGS_GROW_DOWNWARD targets, and they all
      implement their own specialized gimplify_va_arg_expr routines.  */