defaults.h (FRAME_GROWS_DOWNWARD): Define to 0 if not defined.
authorJakub Jelinek <jakub@gcc.gnu.org>
Sun, 26 Jun 2005 05:18:53 +0000 (07:18 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 26 Jun 2005 05:18:53 +0000 (07:18 +0200)
* defaults.h (FRAME_GROWS_DOWNWARD): Define to 0 if not defined.
* function.c (get_func_frame_size): Use if (FRAME_GROWS_DOWNWARD)
instead of preprocessor conditionals.
(assign_stack_local_1, assign_stack_temp_for_type): Likewise.
* cfgexpand.c (FRAME_GROWS_DOWNWARD): Don't redefine to 1 or 0
depending on if it was or was not defined previously.
* doc/rtl.texi (VIRTUAL_STACK_VARS_REGNUM): Mention that only non-zero
definition of FRAME_GROWS_DOWNWARD means frame grows downward.
* doc/tm.texi (FRAME_GROWS_DOWNWARD): Likewise.
* config/m68hc11/m68hc11.h (FRAME_GROWS_DOWNWARD): Define to 0.  Update
comment.
* config/pa/pa.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/stormy16/stormy16.h (FRAME_GROWS_DOWNWARD): Define to 0.
* config/c4x/c4x.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/sh/sh.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/ia64/ia64.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/iq2000/iq2000.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/pdp11/pdp11.h (FRAME_GROWS_DOWNWARD): Define to 1.  Update
comment.
* config/i860/i860.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/h8300/h8300.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/arc/arc.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/vax/vax.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/sparc/sparc.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/i386/i386.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/fr30/fr30.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/frv/frv.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/mn10300/mn10300.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/bfin/bfin.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/ns32k/ns32k.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/v850/v850.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/alpha/alpha.h (FRAME_GROWS_DOWNWARD): Update comment.
* config/s390/s390.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/arm/arm.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/alpha/unicosmk.h (FRAME_GROWS_DOWNWARD): Define to 1.
* config/cris/cris.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/m68k/m68k.h (FRAME_GROWS_DOWNWARD): Likewise.
* config/mmix/mmix.h (FRAME_GROWS_DOWNWARD): Likewise.

From-SVN: r101329

34 files changed:
gcc/ChangeLog
gcc/cfgexpand.c
gcc/config/alpha/alpha.h
gcc/config/alpha/unicosmk.h
gcc/config/arc/arc.h
gcc/config/arm/arm.h
gcc/config/bfin/bfin.h
gcc/config/c4x/c4x.h
gcc/config/cris/cris.h
gcc/config/fr30/fr30.h
gcc/config/frv/frv.h
gcc/config/h8300/h8300.h
gcc/config/i386/i386.h
gcc/config/i860/i860.h
gcc/config/ia64/ia64.h
gcc/config/iq2000/iq2000.h
gcc/config/m68hc11/m68hc11.h
gcc/config/m68k/m68k.h
gcc/config/mmix/mmix.h
gcc/config/mn10300/mn10300.h
gcc/config/ns32k/ns32k.h
gcc/config/pa/pa.h
gcc/config/pdp11/pdp11.h
gcc/config/rs6000/rs6000.h
gcc/config/s390/s390.h
gcc/config/sh/sh.h
gcc/config/sparc/sparc.h
gcc/config/stormy16/stormy16.h
gcc/config/v850/v850.h
gcc/config/vax/vax.h
gcc/defaults.h
gcc/doc/rtl.texi
gcc/doc/tm.texi
gcc/function.c

index 18c7e41..db5ef09 100644 (file)
@@ -1,3 +1,45 @@
+2005-06-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * defaults.h (FRAME_GROWS_DOWNWARD): Define to 0 if not defined.
+       * function.c (get_func_frame_size): Use if (FRAME_GROWS_DOWNWARD)
+       instead of preprocessor conditionals.
+       (assign_stack_local_1, assign_stack_temp_for_type): Likewise.
+       * cfgexpand.c (FRAME_GROWS_DOWNWARD): Don't redefine to 1 or 0
+       depending on if it was or was not defined previously.
+       * doc/rtl.texi (VIRTUAL_STACK_VARS_REGNUM): Mention that only non-zero
+       definition of FRAME_GROWS_DOWNWARD means frame grows downward.
+       * doc/tm.texi (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/m68hc11/m68hc11.h (FRAME_GROWS_DOWNWARD): Define to 0.  Update
+       comment.
+       * config/pa/pa.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/stormy16/stormy16.h (FRAME_GROWS_DOWNWARD): Define to 0.
+       * config/c4x/c4x.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/sh/sh.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/ia64/ia64.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/iq2000/iq2000.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/pdp11/pdp11.h (FRAME_GROWS_DOWNWARD): Define to 1.  Update
+       comment.
+       * config/i860/i860.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/h8300/h8300.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/arc/arc.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/vax/vax.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/sparc/sparc.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/i386/i386.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/fr30/fr30.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/frv/frv.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/mn10300/mn10300.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/bfin/bfin.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/ns32k/ns32k.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/v850/v850.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/alpha/alpha.h (FRAME_GROWS_DOWNWARD): Update comment.
+       * config/s390/s390.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/arm/arm.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/alpha/unicosmk.h (FRAME_GROWS_DOWNWARD): Define to 1.
+       * config/cris/cris.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/m68k/m68k.h (FRAME_GROWS_DOWNWARD): Likewise.
+       * config/mmix/mmix.h (FRAME_GROWS_DOWNWARD): Likewise.
+
 2005-06-26  Kazu Hirata  <kazu@codesourcery.com>
 
        PR tree-optimization/22026
 
 2005-06-21  Jeff Law  <law@redhat.com>
 
-        * tree-vrp.c (extract_range_from_unary_expr): Handle type
-        conversions better.
+       * tree-vrp.c (extract_range_from_unary_expr): Handle type
+       conversions better.
 
 2005-06-21  Dorit Nuzman  <dorit@il.ibm.com>
 
index cfd955a..1747309 100644 (file)
@@ -88,13 +88,6 @@ failed:
 #define STACK_ALIGNMENT_NEEDED 1
 #endif
 
-#ifdef FRAME_GROWS_DOWNWARD
-# undef FRAME_GROWS_DOWNWARD
-# define FRAME_GROWS_DOWNWARD 1
-#else
-# define FRAME_GROWS_DOWNWARD 0
-#endif
-
 
 /* This structure holds data relevant to one variable that will be
    placed in a stack slot.  */
index 78b3392..19668e9 100644 (file)
@@ -735,11 +735,11 @@ extern int alpha_memory_latency;
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-/* #define FRAME_GROWS_DOWNWARD */
+/* #define FRAME_GROWS_DOWNWARD */
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 251e366..da7d375 100644 (file)
@@ -96,7 +96,7 @@ Boston, MA 02110-1301, USA.  */
 \f
 /* The stack frame grows downward.  */
 
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Define the offset between two registers, one to be eliminated, and the
    other its replacement, at the start of a routine. This is somewhat
index d9b51c0..f4e4648 100644 (file)
@@ -456,11 +456,11 @@ extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
    pointer to a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index fe3e7a6..65b4bad 100644 (file)
@@ -1334,7 +1334,7 @@ enum reg_class
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD  1
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
index edea77e..c366fbc 100644 (file)
@@ -79,11 +79,11 @@ extern const char *bfin_library_id_string;
 
 #define STACK_PUSH_CODE PRE_DEC
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* We define a dummy ARGP register; the parameters start at offset 0 from
    it. */
index c397257..895a34b 100644 (file)
@@ -863,12 +863,12 @@ enum reg_class
 /* #define STACK_GROWS_DOWNWARD.  */
 /* Like the dsp16xx, i370, i960, and we32k ports.  */
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
 
-/* #define FRAME_GROWS_DOWNWARD.  */
+#define FRAME_GROWS_DOWNWARD 0
 
 
 /* Registers That Address the Stack Frame.  */
index 786e63c..25c0cd4 100644 (file)
@@ -681,7 +681,7 @@ enum reg_class
 /* Node: Frame Layout */
 
 #define STACK_GROWS_DOWNWARD
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* It seems to be indicated in the code (at least 2.1) that this is
    better a constant, and best 0.  */
index b2a0a26..37ed63a 100644 (file)
@@ -463,8 +463,8 @@ enum reg_class
    to a smaller address.  */
 #define STACK_GROWS_DOWNWARD 1
 
-/* Define this macro if the addresses of local variable slots are at negative
-   offsets from the frame pointer.  */
+/* Define this to macro non-zero if the addresses of local variable slots
+   are at negative offsets from the frame pointer.  */
 #define FRAME_GROWS_DOWNWARD 1
 
 /* Offset from the frame pointer to the first local variable slot to be
index 2cbcb29..b33805c 100644 (file)
@@ -1445,9 +1445,9 @@ typedef struct frv_stack {
    to a smaller address.  */
 #define STACK_GROWS_DOWNWARD 1
 
-/* Define this macro if the addresses of local variable slots are at negative
-   offsets from the frame pointer.  */
-#define FRAME_GROWS_DOWNWARD
+/* Define this macro to non-zero if the addresses of local variable slots
+   are at negative offsets from the frame pointer.  */
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset from the frame pointer to the first local variable slot to be
    allocated.
index da43488..3b38e31 100644 (file)
@@ -485,12 +485,12 @@ enum reg_class {
 
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
 
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index bc8fa0e..11e0a3c 100644 (file)
@@ -1356,11 +1356,11 @@ enum reg_class
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 0a22447..07da9b9 100644 (file)
@@ -356,11 +356,11 @@ enum reg_class { NO_REGS, GENERAL_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES };
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 342a243..e97bf07 100644 (file)
@@ -949,9 +949,9 @@ enum reg_class
    to a smaller address.  */
 #define STACK_GROWS_DOWNWARD 1
 
-/* Define this macro if the addresses of local variable slots are at negative
-   offsets from the frame pointer.  */
-/* #define FRAME_GROWS_DOWNWARD */
+/* Define this macro to non-zero if the addresses of local variable slots
+   are at negative offsets from the frame pointer.  */
+#define FRAME_GROWS_DOWNWARD 0
 
 /* Offset from the frame pointer to the first local variable slot to
    be allocated.  */
index e4471af..f60b627 100644 (file)
@@ -301,7 +301,7 @@ enum reg_class
 
 #define STACK_GROWS_DOWNWARD
 
-/* #define FRAME_GROWS_DOWNWARD */
+#define FRAME_GROWS_DOWNWARD 0
 
 #define STARTING_FRAME_OFFSET                                          \
   (current_function_outgoing_args_size)
index 95cf68b..b033d6e 100644 (file)
@@ -800,14 +800,14 @@ extern enum reg_class m68hc11_tmp_regs_class;
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.
 
-   Don't define for 68HC11, the frame pointer is the bottom
+   Define to 0 for 68HC11, the frame pointer is the bottom
    of local variables.  */
-/* #define FRAME_GROWS_DOWNWARD */
+#define FRAME_GROWS_DOWNWARD           0
 
 /* Define this if successive arguments to a function occupy decreasing 
    addresses in the stack.  */
index a60f06e..e986f11 100644 (file)
@@ -448,7 +448,7 @@ extern enum reg_class regno_reg_class[];
 /* Stack layout; function entry, exit and calling.  */
 
 #define STACK_GROWS_DOWNWARD
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 #define STARTING_FRAME_OFFSET 0
 
 /* On the 680x0, sp@- in a byte insn really pushes a word.
index 0fe3359..9ae7bc7 100644 (file)
@@ -534,7 +534,7 @@ enum reg_class
 /* Node: Frame Layout */
 
 #define STACK_GROWS_DOWNWARD
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 #define STARTING_FRAME_OFFSET \
   mmix_starting_frame_offset ()
index 7ecf001..e86c7b5 100644 (file)
@@ -480,12 +480,12 @@ enum reg_class {
 
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
 
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 504a63b..1e503cf 100644 (file)
@@ -452,11 +452,11 @@ enum reg_class
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index e2ce631..b20a1b7 100644 (file)
@@ -494,11 +494,11 @@ extern struct rtx_def *hppa_pic_save_rtx (void);
 /* Believe it or not.  */
 #define ARGS_GROW_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-/* #define FRAME_GROWS_DOWNWARD */
+#define FRAME_GROWS_DOWNWARD 0
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 6cf36d4..bb83fdf 100644 (file)
@@ -415,12 +415,12 @@ loading is easier into LOAD_FPU_REGS than FPU_REGS! */
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.
 */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index cde6ac6..fdc1dc1 100644 (file)
@@ -1218,14 +1218,14 @@ extern enum rs6000_abi rs6000_current_abi;      /* available for use by subtarget */
 /* Offsets recorded in opcodes are a multiple of this alignment factor.  */
 #define DWARF_CIE_DATA_ALIGNMENT (-((int) (TARGET_32BIT ? 4 : 8)))
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.
 
    On the RS/6000, we grow upwards, from the area after the outgoing
    arguments.  */
-/* #define FRAME_GROWS_DOWNWARD */
+#define FRAME_GROWS_DOWNWARD 0
 
 /* Size of the outgoing register save area */
 #define RS6000_REG_SAVE ((DEFAULT_ABI == ABI_AIX                       \
index c92acac..77387e6 100644 (file)
@@ -506,7 +506,7 @@ extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER];
    are accessed by positive offsets, and function arguments are stored at
    increasing addresses.  */
 #define STACK_GROWS_DOWNWARD
-/* #undef FRAME_GROWS_DOWNWARD */
+/* #define FRAME_GROWS_DOWNWARD 0 */
 /* #undef ARGS_GROW_DOWNWARD */
 
 /* The basic stack layout looks like this: the stack pointer points
index eabdc30..fafa09e 100644 (file)
@@ -1694,11 +1694,11 @@ extern enum reg_class reg_class_from_letter[];
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/*  Define this macro if the addresses of local variable slots are at
-    negative offsets from the frame pointer.
+/*  Define this macro to non-zero if the addresses of local variable slots
+    are at negative offsets from the frame pointer.
 
     The SH only has positive indexes, so grow the frame up.  */
-/* #define FRAME_GROWS_DOWNWARD */
+#define FRAME_GROWS_DOWNWARD 0
 
 /* Offset from the frame pointer to the first local variable slot to
    be allocated.  */
index b39530b..95fd760 100644 (file)
@@ -1360,11 +1360,11 @@ extern char leaf_reg_remap[];
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 1bcaf3f..d224271 100644 (file)
@@ -337,7 +337,7 @@ enum reg_class
    because we don't have any pre-increment ones.  */
 #define STACK_PUSH_CODE POST_INC
 
-/* #define FRAME_GROWS_DOWNWARD */
+#define FRAME_GROWS_DOWNWARD 0
 
 #define ARGS_GROW_DOWNWARD 1
 
index bc8b040..4b0af76 100644 (file)
@@ -434,12 +434,12 @@ enum reg_class
 
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
 
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 8d29b58..ca806fe 100644 (file)
@@ -314,11 +314,11 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
    makes the stack pointer a smaller address.  */
 #define STACK_GROWS_DOWNWARD
 
-/* Define this if the nominal address of the stack frame
+/* Define this to non-zero if the nominal address of the stack frame
    is at the high-address end of the local variables;
    that is, each additional local variable allocated
    goes at a more negative offset in the frame.  */
-#define FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 1
 
 /* Offset within stack frame to start allocating local variables at.
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
index 9314d9d..8474978 100644 (file)
@@ -842,4 +842,8 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
 #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
 #endif
 
+#ifndef FRAME_GROWS_DOWNWARD
+#define FRAME_GROWS_DOWNWARD 0
+#endif
+
 #endif  /* ! GCC_DEFAULTS_H */
index daca4cb..72853a6 100644 (file)
@@ -1505,9 +1505,9 @@ value of @code{FIRST_PARM_OFFSET}.
 @findex VIRTUAL_STACK_VARS_REGNUM
 @cindex @code{FRAME_GROWS_DOWNWARD} and virtual registers
 @item VIRTUAL_STACK_VARS_REGNUM
-If @code{FRAME_GROWS_DOWNWARD} is defined, this points to immediately
-above the first variable on the stack.  Otherwise, it points to the
-first variable on the stack.
+If @code{FRAME_GROWS_DOWNWARD} is defined to a non-zero value, this points
+to immediately above the first variable on the stack.  Otherwise, it points
+to the first variable on the stack.
 
 @cindex @code{STARTING_FRAME_OFFSET} and virtual registers
 @cindex @code{FRAME_POINTER_REGNUM} and virtual registers
index b2310e0..fbf5cd1 100644 (file)
@@ -2752,8 +2752,8 @@ which is often wrong.
 @end defmac
 
 @defmac FRAME_GROWS_DOWNWARD
-Define this macro if the addresses of local variable slots are at negative
-offsets from the frame pointer.
+Define this macro to non-zero value if the addresses of local variable slots
+are at negative offsets from the frame pointer.
 @end defmac
 
 @defmac ARGS_GROW_DOWNWARD
index 45f1316..c5c8dd8 100644 (file)
@@ -347,11 +347,10 @@ free_after_compilation (struct function *f)
 static HOST_WIDE_INT
 get_func_frame_size (struct function *f)
 {
-#ifdef FRAME_GROWS_DOWNWARD
-  return -f->x_frame_offset;
-#else
-  return f->x_frame_offset;
-#endif
+  if (FRAME_GROWS_DOWNWARD)
+    return -f->x_frame_offset;
+  else
+    return f->x_frame_offset;
 }
 
 /* Return size needed for stack frame based on slots so far allocated.
@@ -412,9 +411,8 @@ assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align,
   else
     alignment = align / BITS_PER_UNIT;
 
-#ifdef FRAME_GROWS_DOWNWARD
-  function->x_frame_offset -= size;
-#endif
+  if (FRAME_GROWS_DOWNWARD)
+    function->x_frame_offset -= size;
 
   /* Ignore alignment we can't do with expected alignment of the boundary.  */
   if (alignment * BITS_PER_UNIT > PREFERRED_STACK_BOUNDARY)
@@ -440,17 +438,16 @@ assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align,
          division with a negative dividend isn't as well defined as we might
          like.  So we instead assume that ALIGNMENT is a power of two and
          use logical operations which are unambiguous.  */
-#ifdef FRAME_GROWS_DOWNWARD
-      function->x_frame_offset
-       = (FLOOR_ROUND (function->x_frame_offset - frame_phase,
-                       (unsigned HOST_WIDE_INT) alignment)
-          + frame_phase);
-#else
-      function->x_frame_offset
-       = (CEIL_ROUND (function->x_frame_offset - frame_phase,
-                      (unsigned HOST_WIDE_INT) alignment)
-          + frame_phase);
-#endif
+      if (FRAME_GROWS_DOWNWARD)
+       function->x_frame_offset
+         = (FLOOR_ROUND (function->x_frame_offset - frame_phase,
+                         (unsigned HOST_WIDE_INT) alignment)
+            + frame_phase);
+      else
+       function->x_frame_offset
+         = (CEIL_ROUND (function->x_frame_offset - frame_phase,
+                        (unsigned HOST_WIDE_INT) alignment)
+            + frame_phase);
     }
 
   /* On a big-endian machine, if we are allocating more space than we will use,
@@ -471,9 +468,8 @@ assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align,
                          (function->x_frame_offset + bigend_correction,
                           Pmode));
 
-#ifndef FRAME_GROWS_DOWNWARD
-  function->x_frame_offset += size;
-#endif
+  if (!FRAME_GROWS_DOWNWARD)
+    function->x_frame_offset += size;
 
   x = gen_rtx_MEM (mode, addr);
 
@@ -698,20 +694,22 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
         can be either above or below this stack slot depending on which
         way the frame grows.  We include the extra space if and only if it
         is above this slot.  */
-#ifdef FRAME_GROWS_DOWNWARD
-      p->size = frame_offset_old - frame_offset;
-#else
-      p->size = size;
-#endif
+      if (FRAME_GROWS_DOWNWARD)
+       p->size = frame_offset_old - frame_offset;
+      else
+       p->size = size;
 
       /* Now define the fields used by combine_temp_slots.  */
-#ifdef FRAME_GROWS_DOWNWARD
-      p->base_offset = frame_offset;
-      p->full_size = frame_offset_old - frame_offset;
-#else
-      p->base_offset = frame_offset_old;
-      p->full_size = frame_offset - frame_offset_old;
-#endif
+      if (FRAME_GROWS_DOWNWARD)
+       {
+         p->base_offset = frame_offset;
+         p->full_size = frame_offset_old - frame_offset;
+       }
+      else
+       {
+         p->base_offset = frame_offset_old;
+         p->full_size = frame_offset - frame_offset_old;
+       }
       p->address = 0;
 
       selected = p;