diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f3f0cdba44b6..a20aed1230e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-07-27 DJ Delorie + + * config/mep/mep.c (mep_expand_builtin_saveregs): Make sure 64-bit + types are dword-aligned. + (mep_expand_va_start): Likewise. + 2009-07-27 Olivier Hainque Douglas B Rupp diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index a5869ca1c18a..e237c4741991 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -3530,15 +3530,23 @@ mep_expand_builtin_saveregs (void) rtx regbuf; ns = cfun->machine->arg_regs_to_save; - bufsize = ns * (TARGET_IVC2 ? 12 : 4); - regbuf = assign_stack_local (SImode, bufsize, 32); + if (TARGET_IVC2) + { + bufsize = 8 * ((ns + 1) / 2) + 8 * ns; + regbuf = assign_stack_local (SImode, bufsize, 64); + } + else + { + bufsize = ns * 4; + regbuf = assign_stack_local (SImode, bufsize, 32); + } move_block_from_reg (5-ns, regbuf, ns); if (TARGET_IVC2) { rtx tmp = gen_rtx_MEM (DImode, XEXP (regbuf, 0)); - int ofs = 4 * ns; + int ofs = 8 * ((ns+1)/2); for (i=0; i