mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 19:37:06 -05:00
Uses a more precise intructions set detection.
This allows to build with old assembler programs.
This commit is contained in:
parent
c647e75885
commit
7d6c30333f
12 changed files with 355 additions and 119 deletions
|
|
@ -44,6 +44,7 @@ void raid_init(void)
|
|||
raid_rec_ptr[5] = raid_recX_int8;
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
#ifdef CONFIG_SSE2
|
||||
if (raid_cpu_has_sse2()) {
|
||||
raid_gen_ptr[0] = raid_gen1_sse2;
|
||||
#ifdef CONFIG_X86_64
|
||||
|
|
@ -59,7 +60,9 @@ void raid_init(void)
|
|||
raid_genz_ptr = raid_genz_sse2;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SSSE3
|
||||
if (raid_cpu_has_ssse3()) {
|
||||
#ifdef CONFIG_X86_64
|
||||
raid_gen3_ptr = raid_gen3_ssse3ext;
|
||||
|
|
@ -79,7 +82,9 @@ void raid_init(void)
|
|||
raid_rec_ptr[4] = raid_recX_ssse3;
|
||||
raid_rec_ptr[5] = raid_recX_ssse3;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_AVX2
|
||||
if (raid_cpu_has_avx2()) {
|
||||
raid_gen_ptr[0] = raid_gen1_avx2;
|
||||
raid_gen_ptr[1] = raid_gen2_avx2;
|
||||
|
|
@ -98,6 +103,7 @@ void raid_init(void)
|
|||
raid_rec_ptr[5] = raid_recX_avx2;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_X86 */
|
||||
|
||||
/* set the default mode */
|
||||
raid_mode(RAID_MODE_CAUCHY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue