This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
SSE arguments alignment
>
>
> I think the problem is that the compiler is not properly padding data.
> _mm_store_ps is nearly unique in that its argument order is
>
> _mm_store_ps( float*, vector );
>
> The 0x4 offset is to protect the float* that is written to the stack a few
> bytes earlier. The compiler needs to insert an extra 12 bytes of padding.
> In fact, it I swap the order of the arguments as follows:
>
> _mm_store_ps( vector, float*)
>
> then the crash goes away.
Yes, that is the bug - outgoing operands are always aligned to 32bit
only as ia32 ABI mandates. I am not quite sure how this should be
hanled, as we need to increase the alignment of only SSE operands
(probably structure containing SSE operand too, but structure containing
other 128bit or 64bit aligned field should not get aligned).
Richard, Bernd comments?
Honza
>
> Ian
>
> ---------------------------------------------------
> Ian Ollmann, Ph.D. iano@cco.caltech.edu
> ---------------------------------------------------