GCC - How to realign stack?

前端 未结 5 777
广开言路
广开言路 2021-02-09 05:45

I try to build an application which uses pthreads and __m128 SSE type. According to GCC manual, default stack alignment is 16 bytes. In order to use __m128, the requirement is t

5条回答
  •  野性不改
    2021-02-09 06:20

    This shouldn't be happening in the first place, but to work around the problem you can try:

    void *f(void *x)
    {
       __m128 y __attribute__ ((aligned (16)));
       ...
    }
    

提交回复
热议问题