aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2001-09-02 01:14:45 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2001-09-02 01:14:45 +0000
commit9e0e11bfe4af10bef0a326b926f36a1546ee4882 (patch)
tree0f1fa75843bc922de60b8216492c90d6b82eeece
parente27e731daa7966bf10323d61618706d3aaa44b99 (diff)
downloadgcc-9e0e11bfe4af10bef0a326b926f36a1546ee4882.zip
gcc-9e0e11bfe4af10bef0a326b926f36a1546ee4882.tar.gz
gcc-9e0e11bfe4af10bef0a326b926f36a1546ee4882.tar.bz2
expr.c (push_block): Make sane use of STACK_GROWS_DOWNWARD.
* expr.c (push_block): Make sane use of STACK_GROWS_DOWNWARD. (emit_push_insn): Use specified padding direction when STACK_PUSH_CODE is POST_INC. From-SVN: r45352
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/expr.c12
2 files changed, 7 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3a2c75a..260f09f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2001-09-01 Geoffrey Keating <geoffk@redhat.com>
+ * expr.c (push_block): Make sane use of STACK_GROWS_DOWNWARD.
+ (emit_push_insn): Use specified padding direction when
+ STACK_PUSH_CODE is POST_INC.
+
* config/stormy16/stormy16.h (DWARF2_UNWIND_INFO): Define to 0.
2001-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
diff --git a/gcc/expr.c b/gcc/expr.c
index 222d7ec..e8774e4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3102,18 +3102,11 @@ push_block (size, extra, below)
}
#ifndef STACK_GROWS_DOWNWARD
-#ifdef ARGS_GROW_DOWNWARD
- if (!ACCUMULATE_OUTGOING_ARGS)
-#else
if (0)
-#endif
#else
if (1)
#endif
{
- /* Return the lowest stack address when STACK or ARGS grow downward and
- we are not aaccumulating outgoing arguments (the c4x port uses such
- conventions). */
temp = virtual_outgoing_args_rtx;
if (extra != 0 && below)
temp = plus_constant (temp, extra);
@@ -3273,8 +3266,9 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
Default is below for small data on big-endian machines; else above. */
enum direction where_pad = FUNCTION_ARG_PADDING (mode, type);
- /* Invert direction if stack is post-update. */
- if (STACK_PUSH_CODE == POST_INC || STACK_PUSH_CODE == POST_DEC)
+ /* Invert direction if stack is post-decrement.
+ FIXME: why? */
+ if (STACK_PUSH_CODE == POST_DEC)
if (where_pad != none)
where_pad = (where_pad == downward ? upward : downward);