mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-10-19 16:03:45 +00:00
Fix compiler warning
This commit is contained in:
parent
b360e8e6b0
commit
6fa1f56bb7
4 changed files with 23 additions and 17 deletions
|
@ -264,6 +264,20 @@ def compiler_is_gcc():
|
|||
|
||||
|
||||
def compiler_supports_sse2():
|
||||
source = """
|
||||
#include <intrin.h>
|
||||
int main(void)
|
||||
{
|
||||
__m128i r0;
|
||||
int mask;
|
||||
r0 = _mm_set1_epi32(0);
|
||||
mask = _mm_movemask_epi8(r0);
|
||||
return mask;
|
||||
}
|
||||
"""
|
||||
if test_compilation(source, msg="SSE2(intrin.h)"):
|
||||
return {'extra_cc_options': [], 'extra_macros': ['HAVE_INTRIN_H', 'USE_SSE2']}
|
||||
|
||||
source = """
|
||||
#include <x86intrin.h>
|
||||
int main(void)
|
||||
|
@ -293,19 +307,6 @@ def compiler_supports_sse2():
|
|||
if test_compilation(source, extra_cc_options=['-msse2'], msg="SSE2(emmintrin.h)"):
|
||||
return {'extra_cc_options': ['-msse2'], 'extra_macros': ['HAVE_EMMINTRIN_H', 'USE_SSE2']}
|
||||
|
||||
source = """
|
||||
#include <intrin.h>
|
||||
int main(void)
|
||||
{
|
||||
__m128i r0;
|
||||
r0 = _mm_set1_epi32(0);
|
||||
mask = _mm_movemask_epi8(r0);
|
||||
return mask;
|
||||
}
|
||||
"""
|
||||
if test_compilation(source, msg="SSE2(intrin.h)"):
|
||||
return {'extra_cc_options': [], 'extra_macros': ['HAVE_INTRIN_H', 'USE_SSE2']}
|
||||
|
||||
return False
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue