This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/39137] [4.4 Regression] -mpreferred-stack-boundary=2 causes lots of dynamic realign



------- Comment #28 from hjl dot tools at gmail dot com  2009-02-21 15:38 -------
(In reply to comment #26)
> I had somehting along this lines in mind:
> Index: config/i386/i386.c
> ===================================================================
> *** config/i386/i386.c  (revision 144352)
> --- config/i386/i386.c  (working copy)
> *************** unsigned int
> *** 19332,19337 ****
> --- 19332,19343 ----
>   ix86_local_alignment (tree type, enum machine_mode mode,
>                       unsigned int align)
>   {
> +   /* We don't want to align DImode to 64bit for compilation with
> +      -mpreferred-stack-boundary=2 to not enforce dynamic stack alignment
> +      prologue.  */
> +   if (mode == DImode && !TARGET_64BIT && ix86_preferred_stack_boundary < 64)
> +     align = 32;
> + 
>     /* If TYPE is NULL, we are allocating a stack slot for caller-save
>        register in MODE.  We will return the largest alignment of XF
>        and DF.  */
> 

Will it work with

---
void foo (unsigned long long *);

void
bar (void)
{
  unsigned long long l __attribute__ ((aligned(32)));
  foo (&l);
}
---


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39137


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]