This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Segfault with SSE builtins
- From: Ross Smith <r-smith at ihug dot co dot nz>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 11 Jul 2002 04:35:19 +1200
- Subject: Re: Segfault with SSE builtins
On Thursday, 11 July 2002 04:16, you wrote:
> > I've been trying to get the builtin functions corresponding to SSE
> > instructions to work, and I keep getting segfaults on any code that
> > uses them. Example:
> >
> > typedef float v4sf __attribute__ ((mode(V4SF)));
> > int main() {
> > v4sf u, v, w;
> > w = __builtin_ia32_addps(u, v);
> > return 0;
> > }
>
> Most likely your runtime
Just to check that we're on the same page here: by "runtime" you mean
the CRTL, i.e. glibc, right?
> is broken and misaligns the entry stack for
> main.
> GCC aligns the outgoing stacks, but does not align the frame of main,
> so you need to use the vector types only in other functions.
Yes, moving the call to a separate function makes it work. Thanks.
Why doesn't adding aligned(16) to the type's attributes fix it?
--
Ross Smith ..................................... Auckland, New Zealand
r-smith@ihug.co.nz ...................................................
"Never underestimate the power of stupid things in large numbers."
-- Serious Sam