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 18c7e41ea01500d20b098827b09983eae057aa8d..db5ef095b03928ce5412812ece6cc9983a0fc02d 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 cfd955af13ae8f8431c96c465d7ee28222d73e62..1747309010cf58b79a9de5566be08c9b913d047c 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 78b33925553b73a931d5b6bbc2f935ca025a57e0..19668e920bc911431cdc6eef41dff7ad86dd2cbf 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 251e3662589c8bb50ec9ce4ab6608d8e3ce44600..da7d375f3b4591178eed494ab1f874be91926b4a 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 d9b51c052882fd58cb9cd7034fbb69713b226df3..f4e4648f5071bb1ccd58bf69f363712a5990bae9 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 fe3e7a6230b0f5670b9d8898effb254bc675be68..65b4bad144be3534447d290d14d541e6d38ded3d 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 edea77e669e2489604c2b3c821f1c9e35da497ed..c366fbc513a83f64471b605994459ec7eaafdcb3 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 c397257c0cbf8c946ee60b77ebc6e7657e810df6..895a34b1997dbf9659f4d19c0c29d275ebaabc18 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 786e63c539d6d23c4d80a40a7f78b1089bf75413..25c0cd43f6fe0f258c3d122bac72de54721694c6 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 b2a0a261dfb1745ba381b642f30e685b5dd342b3..37ed63a339bbfc396a185a4b808bdb047ce1d0f2 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 2cbcb296dc3e4a9198c2c78fac32fa17d2311d6b..b33805c0a1a16bdfcde777c3181c85f0a199b9a9 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 da434886c43a8ff4aa66990162216eb124aa1569..3b38e31563389e34eb4e47a72216e27b8609d7d1 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 bc8fa0e58405387a39d6b330954889e547efdbce..11e0a3c14cd215e1b36477ea0758041dcfd702f1 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 0a22447f68b9dc019d30306be59281ee0165a1d1..07da9b9311a170315bfec23a1a0ee2120459cee7 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 342a243bbee4eda3663d2234e4f58031b1a8321c..e97bf077bfc3cd2c9971623e74aab2a1c09c9373 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 e4471af1e95e15be282979648d98403e9944f76f..f60b6277f8a3716f078142add9e76a7a67f37a8c 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 95cf68bd15ee426e5971a5cdf7e0c76c5f6ffd86..b033d6e50c3bbbeb4aaac49f6f0cf1351b37b71a 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 a60f06ebef979bd3377007575b327c55d208c82a..e986f11ea938232678c414ac6449ead0a01cffed 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 0fe3359e3de6d4f2e5ede7dbab862449168adc8b..9ae7bc7f36d605a0db82527d33a7819ca34ffbe0 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 7ecf001c834f10dfe44493dbe66300875c2f2920..e86c7b5668543cd480dc5cfbdb472abc9b880e1f 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 504a63b5d326bd58e2db5e83307945ab45520bc3..1e503cf5f86821165c7d8a4f29608ef883ed40ea 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 e2ce63165b95e11ee8d7801251a46a81ae043da9..b20a1b7bcaaec033230740b9e3b1a6088ee1967b 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 6cf36d47f6f296569e19d127404bf2c4984b1483..bb83fdfd4b0b85334b1f9b04d8c82479cd9b7d3e 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 cde6ac63411b0a3ea0f7c25e4cd414f3b7900276..fdc1dc13ad62e5ed007c6acbf60ee276032f84db 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 c92acac63ac0fefc9c49b0fc77fb45fa099305a7..77387e6a5809c0294fb6adc5ba1649bfd52af001 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 eabdc30eef3cfbba46eb6978abc4a73d4c896f3b..fafa09e2631ce20e8ff8ca146a4f79ac58e20fc1 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 b39530b601a537676cb576f63ef576fc38d393a8..95fd760de57966a369f039a8aa66a30e352cecb4 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 1bcaf3fa87bdb94da9d56ca57e032683a05e3ad4..d224271401b18a574360421d7f7ba4c2efe1fb57 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 bc8b0401b9e9bef9648eb635ff8cbeeeab595476..4b0af763ace242d72decda63ddeb162e477fef0a 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 8d29b58ec1e4a8da2e5cb3e0e77b8e3f55376745..ca806fe2a0febf2732ecf3368c59bf89a6a836e5 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 9314d9d33a63c2a5d160c776f7cb6da0bf4859a2..8474978774469bc33b9e4a9e6f32e99ea7295f44 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 daca4cb5304c82dcac6bfcf68e39c25bcc79b89e..72853a6a556e55f462fc2e275f37239e74c62ea2 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 b2310e0ffc3813b595ef8f1e81e46cc38ad2feb8..fbf5cd1bf85a800a1dcb243e63ad68630bb486c7 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 45f13166c5aa8d586b2e9ed3124869d4e6bfb594..c5c8dd80dfd4556c91e4fc11d668bc9046dd22ff 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;