mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Adds GCC options to disable SSE2 use by the compiler.
This commit is contained in:
parent
facabeb5ef
commit
8a8408a5d0
2 changed files with 28 additions and 0 deletions
14
raid/x86.c
14
raid/x86.c
|
|
@ -15,6 +15,18 @@
|
|||
#include "internal.h"
|
||||
#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.
|
||||
*/
|
||||
#ifdef CONFIG_X86
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target ("no-sse2,no-avx2")
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
/*
|
||||
* GEN1 (RAID5 with xor) SSE2 implementation
|
||||
|
|
@ -2466,3 +2478,5 @@ void raid_recX_avx2(int nr, int *id, int *ip, int nd, size_t size, void **vv)
|
|||
}
|
||||
#endif
|
||||
|
||||
#pragma GCC pop_options
|
||||
|
||||
|
|
|
|||
14
raid/x86z.c
14
raid/x86z.c
|
|
@ -14,6 +14,18 @@
|
|||
|
||||
#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.
|
||||
*/
|
||||
#ifdef CONFIG_X86
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target ("no-sse2,no-avx2")
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
static const struct gfzconst16 {
|
||||
uint8_t poly[16];
|
||||
|
|
@ -254,3 +266,5 @@ void raid_genz_avx2ext(int nd, size_t size, void **vv)
|
|||
}
|
||||
#endif
|
||||
|
||||
#pragma GCC pop_options
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue