summaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-10-05 06:27:12 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-10-05 06:27:12 +0000
commit235259ddb16d470243cfceac3ea378334a4cef16 (patch)
tree99a602daff56c34a482cc75afc7e72acfbf03553 /gcc/explow.c
parent75d860d60cbe189dc65e7a7fcb0223eb0127bd3e (diff)
downloadgcc-235259ddb16d470243cfceac3ea378334a4cef16.tar.gz
(allocate_dynamic_stack_space) [MUST_ALIGN]:
Always add to size, always round up to STACK_BOUNDARY, always round the address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2320 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index 4d7d5c530ea..0bc635bada8 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -865,7 +865,10 @@ allocate_dynamic_stack_space (size, target, known_align)
#ifdef MUST_ALIGN
-#if !defined (STACK_DYNAMIC_OFFSET) && !defined (STACK_POINTER_OFFSET)
+#if 0 /* It turns out we must always make extra space, if MUST_ALIGN
+ because we must always round the address up at the end,
+ because we don't know whether the dynamic offset
+ will mess up the desired alignment. */
/* If we have to round the address up regardless of known_align,
make extra space regardless, also. */
if (known_align % BIGGEST_ALIGNMENT != 0)
@@ -912,8 +915,9 @@ allocate_dynamic_stack_space (size, target, known_align)
momentarily mis-aligning the stack. */
#ifdef STACK_BOUNDARY
-#ifndef SETJMP_VIA_SAVE_AREA /* If we added a variable amount to SIZE,
- we can no longer assume it is aligned. */
+ /* If we added a variable amount to SIZE,
+ we can no longer assume it is aligned. */
+#if !defined (SETJMP_VIA_SAVE_AREA) && !defined (MUST_ALIGN)
if (known_align % STACK_BOUNDARY != 0)
#endif
size = round_push (size);
@@ -957,9 +961,9 @@ allocate_dynamic_stack_space (size, target, known_align)
#endif
#ifdef MUST_ALIGN
- /* If virtual_stack_dynamic_rtx might not share the alignment of
- the stack pointer register, we must always realign the stack address. */
-#if !defined (STACK_DYNAMIC_OFFSET) && !defined (STACK_POINTER_OFFSET)
+#if 0 /* Even if we know the stack pointer has enough alignment,
+ there's no way to tell whether virtual_stack_dynamic_rtx shares that
+ alignment, so we still need to round the address up. */
if (known_align % BIGGEST_ALIGNMENT != 0)
#endif
{