Alignement problems with SSE vector types

Jan Hubicka jh@suse.cz
Thu Nov 14 08:20:00 GMT 2002


> Hi!
> 
> I get SIGSEGVs due to misaligned memory operands for the
> movaps instruction in both parameter passing and constant
> loading. This is with mainline from about a week ago, I'm just
> now checking current.
> 
> Is this a known problem? A very simple testcase looks like
Yes,
with runtime not aligning entry frame correctly, the frame of main
function is missaligned.  GCC aligns frames of calees, so you can get
around by moving all the code out of main into separate function.

Honza
> 
> typedef float Vector __attribute__((mode(V4SF)));
> 
> void printV(Vector x) {}
> 
> int main(int argc, char **argv)
> {
>         Vector x = { 1.0f, 2.0f, 3.0f, 4.0f };
> 	printV(x);
> 	printV(x);
> 	return 0;
> }
> 
> note that the second call to printV is required, just calling
> once works (just good luck, I think).
> 
> Richard.
> 
> --
> Richard Guenther <richard.guenther@uni-tuebingen.de>
> WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
> The GLAME Project: http://www.glame.de/



More information about the Gcc mailing list