Multi-arch EXTRA_STACK_ALIGNMENT_NEEDED (nee NO_EXTRA_ALIGNMENT_NEEDED).

This commit is contained in:
Andrew Cagney
2000-08-04 03:17:57 +00:00
parent f6e6b40ff5
commit 0a49d05ee0
6 changed files with 47 additions and 19 deletions

View File

@ -1581,27 +1581,27 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
}
}
/* elz: on HPPA no need for this extra alignment, maybe it is needed
on other architectures. This is because all the alignment is taken care
of in the above code (ifdef REG_STRUCT_HAS_ADDR) and in
hppa_push_arguments */
#ifndef NO_EXTRA_ALIGNMENT_NEEDED
/* MVS 11/22/96: I think at least some of this stack_align code is
really broken. Better to let PUSH_ARGUMENTS adjust the stack in
a target-defined manner. */
if (STACK_ALIGN_P () && INNER_THAN (1, 2))
/* elz: on HPPA no need for this extra alignment, maybe it is needed
on other architectures. This is because all the alignment is
taken care of in the above code (ifdef REG_STRUCT_HAS_ADDR) and
in hppa_push_arguments */
if (EXTRA_STACK_ALIGNMENT_NEEDED)
{
/* If stack grows down, we must leave a hole at the top. */
int len = 0;
/* MVS 11/22/96: I think at least some of this stack_align code
is really broken. Better to let PUSH_ARGUMENTS adjust the
stack in a target-defined manner. */
if (STACK_ALIGN_P () && INNER_THAN (1, 2))
{
/* If stack grows down, we must leave a hole at the top. */
int len = 0;
for (i = nargs - 1; i >= 0; i--)
len += TYPE_LENGTH (VALUE_ENCLOSING_TYPE (args[i]));
if (CALL_DUMMY_STACK_ADJUST_P)
len += CALL_DUMMY_STACK_ADJUST;
sp -= STACK_ALIGN (len) - len;
for (i = nargs - 1; i >= 0; i--)
len += TYPE_LENGTH (VALUE_ENCLOSING_TYPE (args[i]));
if (CALL_DUMMY_STACK_ADJUST_P)
len += CALL_DUMMY_STACK_ADJUST;
sp -= STACK_ALIGN (len) - len;
}
}
#endif /* NO_EXTRA_ALIGNMENT_NEEDED */
sp = PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr);