From 09bb2dae9546b80ce81a8c7ead101f0ab873c25f Mon Sep 17 00:00:00 2001 From: dj Date: Mon, 27 Jul 2009 20:31:04 +0000 Subject: [PATCH] * config/mep/mep.c (mep_expand_builtin_saveregs): Make sure 64-bit types are dword-aligned. (mep_expand_va_start): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150136 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/mep/mep.c | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f3f0cdb..a20aed1 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 a5869ca..e237c47 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