This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix PR target/12503


> >  size = sizeof(char *) + 3 * sizeof(double) + sizeof(int);
> >
> >  arguments = __builtin_apply_args();
> >
> >  __builtin_apply(foo, arguments, size);
>
> Because of the alignment padding needed for the double following
> the char *, size needs to be larger by 4 to copy all the args.
> There probably is a problem on hppa64 as well because the last
> int goes in a 64-bit stack slot.

Ok. I think it would be silly to try to find a generic formula. What about

  __builtin_apply(foo, arguments, 64);

instead?

-- 
Eric Botcazou


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