Add CPU "pause" intrinsic for MSVC
This commit is contained in:
parent
bc49863fb5
commit
90c7269c05
22
configure.ac
22
configure.ac
@ -218,12 +218,22 @@ dnl CPU-specific settings.
|
|||||||
CPU_SPINWAIT=""
|
CPU_SPINWAIT=""
|
||||||
case "${host_cpu}" in
|
case "${host_cpu}" in
|
||||||
i686|x86_64)
|
i686|x86_64)
|
||||||
AC_CACHE_VAL([je_cv_pause],
|
if test "x${je_cv_msvc}" = "xyes" ; then
|
||||||
[JE_COMPILABLE([pause instruction], [],
|
AC_CACHE_VAL([je_cv_pause_msvc],
|
||||||
[[__asm__ volatile("pause"); return 0;]],
|
[JE_COMPILABLE([pause instruction MSVC], [],
|
||||||
[je_cv_pause])])
|
[[_mm_pause(); return 0;]],
|
||||||
if test "x${je_cv_pause}" = "xyes" ; then
|
[je_cv_pause_msvc])])
|
||||||
CPU_SPINWAIT='__asm__ volatile("pause")'
|
if test "x${je_cv_pause_msvc}" = "xyes" ; then
|
||||||
|
CPU_SPINWAIT='_mm_pause()'
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_CACHE_VAL([je_cv_pause],
|
||||||
|
[JE_COMPILABLE([pause instruction], [],
|
||||||
|
[[__asm__ volatile("pause"); return 0;]],
|
||||||
|
[je_cv_pause])])
|
||||||
|
if test "x${je_cv_pause}" = "xyes" ; then
|
||||||
|
CPU_SPINWAIT='__asm__ volatile("pause")'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
powerpc)
|
powerpc)
|
||||||
|
Loading…
Reference in New Issue
Block a user