This is the mail archive of the gcc@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: Alignement problems with SSE vector types


> 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/


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