Fix rdtscp detection with --with-lg-vaddr

The rdtscp probe was nested inside the x86_64 LG_VADDR auto-detection block. Passing --with-lg-vaddr skipped the probe and left JEMALLOC_HAVE_RDTSCP undefined even when the instruction was available.

Keep the probe in the x86_64 branch, but run it independently from LG_VADDR auto-detection.
This commit is contained in:
YANG XIN
2026-06-22 16:57:49 +08:00
committed by Slobodan Predolac
parent 43a8adc187
commit e8a0d2b477

View File

@@ -600,6 +600,7 @@ typedef unsigned __int32 uint32_t;
else else
AC_MSG_ERROR([cannot determine number of significant virtual address bits]) AC_MSG_ERROR([cannot determine number of significant virtual address bits])
fi fi
fi
AC_CACHE_CHECK([rdtscp support], AC_CACHE_CHECK([rdtscp support],
[je_cv_rdtscp], [je_cv_rdtscp],
AC_RUN_IFELSE([AC_LANG_PROGRAM( AC_RUN_IFELSE([AC_LANG_PROGRAM(
@@ -617,7 +618,6 @@ typedef unsigned __int32 uint32_t;
if test "x${je_cv_rdtscp}" = "xyes"; then if test "x${je_cv_rdtscp}" = "xyes"; then
AC_DEFINE([JEMALLOC_HAVE_RDTSCP], [ ], [ ]) AC_DEFINE([JEMALLOC_HAVE_RDTSCP], [ ], [ ])
fi fi
fi
;; ;;
*) *)
if test "x$LG_VADDR" = "xdetect"; then if test "x$LG_VADDR" = "xdetect"; then