File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ $binformat = bin64 if ($data =~ /BINARY_64/);
205
205
$no_avx512 = 0;
206
206
if (($architecture eq " x86" ) || ($architecture eq " x86_64" )) {
207
207
$code = ' "vbroadcastss -4 * 4(%rsi), %zmm2"' ;
208
- print $tmpf " int main(void){ __asm__ volatile($code ); }\n " ;
208
+ print $tmpf " #include <immintrin.h> \n\n int main(void){ __asm__ volatile($code ); }\n " ;
209
209
$args = " -march=skylake-avx512 -o $tmpf .o -x c $tmpf " ;
210
210
my @cmd = (" $compiler_name $args >/dev/null 2>/dev/null" );
211
211
system (@cmd ) == 0;
Original file line number Diff line number Diff line change 67
67
endif ()
68
68
69
69
if (X86_64 OR X86 )
70
- file (WRITE ${PROJECT_BINARY_DIR} /avx512.tmp "int main(void){ __asm__ volatile(\" vbroadcastss -4 * 4(%rsi), %zmm2\" ); }" )
70
+ file (WRITE ${PROJECT_BINARY_DIR} /avx512.tmp "#include <immintrin.h> \n\n int main(void){ __asm__ volatile(\" vbroadcastss -4 * 4(%rsi), %zmm2\" ); }" )
71
71
execute_process (COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -v -o ${PROJECT_BINARY_DIR} /avx512.o -x c ${PROJECT_BINARY_DIR} /avx512.tmp OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512 )
72
72
if (NO_AVX512 EQUAL 1 )
73
73
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512" )
You can’t perform that action at this time.
0 commit comments