Aligns with the Linux Kernel about using no-sse and no-avx.

This commit is contained in:
Andrea Mazzoleni 2014-09-20 10:34:28 +02:00
parent 8a8408a5d0
commit 6effc8230e
2 changed files with 10 additions and 12 deletions

View file

@ -16,15 +16,12 @@
#include "gf.h"
/**
* Disables in this file any use of SSE2/AVX2 registers by the compiler
* to avoid to messup with the registers use made by these functions.
*
* Note that this is just a precaution as there is no yet a known case
* of conflicting register use, even if formally possible.
* Disables in this file any use of SSE/AVX registers by the compiler
* to avoid to messup with the registers use made by the following functions.
*/
#ifdef CONFIG_X86
#pragma GCC push_options
#pragma GCC target ("no-sse2,no-avx2")
#pragma GCC target ("no-sse,no-avx")
#endif
#ifdef CONFIG_X86
@ -2478,5 +2475,7 @@ void raid_recX_avx2(int nr, int *id, int *ip, int nd, size_t size, void **vv)
}
#endif
#ifdef CONFIG_X86
#pragma GCC pop_options
#endif

View file

@ -15,15 +15,12 @@
#include "internal.h"
/**
* Disables in this file any use of SSE2/AVX2 registers by the compiler
* to avoid to messup with the registers use made by these functions.
*
* Note that this is just a precaution as there is no yet a known case
* of conflicting register use, even if formally possible.
* Disables in this file any use of SSE/AVX registers by the compiler
* to avoid to messup with the registers use made by the following functions.
*/
#ifdef CONFIG_X86
#pragma GCC push_options
#pragma GCC target ("no-sse2,no-avx2")
#pragma GCC target ("no-sse,no-avx")
#endif
#ifdef CONFIG_X86
@ -266,5 +263,7 @@ void raid_genz_avx2ext(int nd, size_t size, void **vv)
}
#endif
#ifdef CONFIG_X86
#pragma GCC pop_options
#endif