This is the mail archive of the cygwin mailing list for the Cygwin 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: short C code that uses AVX and fails under Cygwin


Looks like this is indeed what happens! Thanks a lot!


Ilya

On 1/14/2016 11:49 PM, Ismail Donmez wrote:
Hi,

On Thu, Jan 14, 2016 at 10:20 PM, Ilya Razenshteyn <ilyaraz@mit.edu> wrote:
Hi all,

the below C code fails under Cygwin. More specifically, the environment is:
Windows 8.1, Cygwin 2.3.1, GCC 4.9.3, CPU 'Intel(R) Core(TM) i7-4510U CPU @
2.00GHz', compilation options are '-O0 -mavx'. Is it indeed a bug in Cygwin
or I don't understand something?

Cheers,
Ilya

#include "immintrin.h"

__m256 routine(void) {
   __m256 aux;
   return aux;
}

int main(void) {
   void *buf = malloc(1);
   __m256 res = routine();
   return 0;
}

I believe this is due to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412 ,
https://stackoverflow.com/questions/5983389/how-to-align-stack-at-32-byte-boundary-in-gcc
has an ugly workaround which might work for you.

Regards,
ismail

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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