lib/Headers/mm_malloc.h: Use __mingw_aligned_malloc() in _mm_malloc() on mingw.

By default, mingw does not have _mm_alloc() nor _aligned_malloc().

llvm-svn: 135388
This commit is contained in:
NAKAMURA Takumi 2011-07-18 11:13:50 +00:00
parent 6121eb346f
commit a185c78d4d
1 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,9 @@ _mm_malloc(size_t size, size_t align)
align = sizeof(void *);
void *mallocedMemory;
#ifdef _WIN32
#if defined(__MINGW32__)
mallocedMemory = __mingw_aligned_malloc(size, align);
#elif defined(_WIN32)
mallocedMemory = _aligned_malloc(size, align);
#else
if (posix_memalign(&mallocedMemory, align, size))