aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2000-04-12 13:56:19 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2000-04-12 13:56:19 +0000
commitebcd0b57fa8d1ba72d39a91629401b2dd4564bf1 (patch)
tree3bc4dc8d8437c72809b666d7fdfd18eaa0c86299 /gcc
parenta4d5044f41a63f010da507a32e16e2a4f8456a90 (diff)
downloadgcc-ebcd0b57fa8d1ba72d39a91629401b2dd4564bf1.zip
gcc-ebcd0b57fa8d1ba72d39a91629401b2dd4564bf1.tar.gz
gcc-ebcd0b57fa8d1ba72d39a91629401b2dd4564bf1.tar.bz2
calls.c (expand_call): Do NO_DEFER_POP unconditionally once stack is propertly aligned...
* calls.c (expand_call): Do NO_DEFER_POP unconditionally once stack is propertly aligned; add sanity checking for aligned stack pointer. (expand_library_call_value_1): Add sanity checking for aligned stack pointer. From-SVN: r33106
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/calls.c18
2 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4a9e95b..c36a8d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+Wed Apr 12 15:54:11 MET DST 2000 Jan Hubicka <jh@suse.cz>
+
+ * calls.c (expand_call): Do NO_DEFER_POP unconditionally once
+ stack is propertly aligned; add sanity checking for aligned
+ stack pointer.
+ (expand_library_call_value_1): Add sanity checking for aligned
+ stack pointer.
+
Wed Apr 12 07:51:54 2000 Catherine Moore <clm@cygnus.com>
* calls.c (emit_library_call_value_1): Change 3rd arg to
diff --git a/gcc/calls.c b/gcc/calls.c
index d4fef87..611eff0 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -2671,10 +2671,10 @@ expand_call (exp, target, ignore)
else if (argblock == 0)
anti_adjust_stack (GEN_INT (args_size.constant
- unadjusted_args_size));
- /* Now that the stack is properly aligned, pops can't safely
- be deferred during the evaluation of the arguments. */
- NO_DEFER_POP;
}
+ /* Now that the stack is properly aligned, pops can't safely
+ be deferred during the evaluation of the arguments. */
+ NO_DEFER_POP;
#endif
/* Don't try to defer pops if preallocating, not even from the first arg,
@@ -2800,6 +2800,12 @@ expand_call (exp, target, ignore)
/* All arguments and registers used for the call must be set up by
now! */
+#ifdef PREFERRED_STACK_BOUNDARY
+ /* Stack must to be properly aligned now. */
+ if (stack_pointer_delta & (preferred_stack_boundary / BITS_PER_UNIT - 1))
+ abort();
+#endif
+
/* Generate the actual call instruction. */
emit_call_1 (funexp, fndecl, funtype, unadjusted_args_size,
args_size.constant, struct_value_size,
@@ -3692,6 +3698,12 @@ emit_library_call_value_1 (retval, orgfun, value, no_queue, outmode, nargs, p)
cse'ing of library calls could delete a call and leave the pop. */
NO_DEFER_POP;
+#ifdef PREFERRED_STACK_BOUNDARY
+ /* Stack must to be properly aligned now. */
+ if (stack_pointer_delta & (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT - 1))
+ abort();
+#endif
+
/* We pass the old value of inhibit_defer_pop + 1 to emit_call_1, which
will set inhibit_defer_pop to that value. */
/* The return type is needed to decide how many bytes the function pops.