File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -203,8 +203,8 @@ $binformat = bin64 if ($data =~ /BINARY_64/);
203
203
204
204
$no_avx512 = 0;
205
205
if (($architecture eq " x86" ) || ($architecture eq " x86_64" )) {
206
- $code = ' "vaddps %zmm1, %zmm0 , %zmm0 "' ;
207
- print $tmpf " void main(void){ __asm__ volatile($code ); }\n " ;
206
+ $code = ' "vbroadcastss -4 * 4(%rsi) , %zmm2 "' ;
207
+ print $tmpf " int main(void){ __asm__ volatile($code ); }\n " ;
208
208
$args = " -o $tmpf .o -x c $tmpf " ;
209
209
my @cmd = (" $compiler_name $args " );
210
210
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 "void main(void){ __asm__ volatile(\" vaddps %zmm1, %zmm0 , %zmm0 \" ); }" )
70
+ file (WRITE ${PROJECT_BINARY_DIR} /avx512.tmp "int main(void){ __asm__ volatile(\" vbroadcastss -4 * 4(%rsi) , %zmm2 \" ); }" )
71
71
execute_process (COMMAND ${CMAKE_C_COMPILER} -v -o ${PROJECT_BINARY_DIR} /avx512.o -x c ${PROJECT_BINARY_DIR} /avx512.tmp 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