(output_stack_adjust): When splitting an adjustment into two parts,

make sure the stack is aligned at all times.

From-SVN: r13846
This commit is contained in:
Joern Rennecke 1997-04-09 18:50:38 +01:00
parent 74452ac323
commit 20ec31d305

View File

@ -2490,11 +2490,15 @@ output_stack_adjust (size, reg, temp)
if (! CONST_OK_FOR_I (size))
{
if (CONST_OK_FOR_I (size / 2) && CONST_OK_FOR_I (size - size / 2))
/* Try to do it with two partial adjustments; however, must make
sure that the stack is properly aligned at all times, in case
an interrupt occurs between the two partial adjustments. */
if (CONST_OK_FOR_I (size / 2 & -4)
&& CONST_OK_FOR_I (size - (size / 2 & -4)))
{
val = GEN_INT (size / 2);
val = GEN_INT (size / 2 & -4);
emit_insn (gen_addsi3 (reg, reg, val));
val = GEN_INT (size - size / 2);
val = GEN_INT (size - (size / 2 & -4));
}
else
{