1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

YJIT: We actually need to run it

for checking it properly
This commit is contained in:
Takashi Kokubun 2022-09-21 15:30:07 +09:00
parent 6b8daf603f
commit 3a524f619b
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -3768,15 +3768,19 @@ AS_CASE(["${YJIT_SUPPORT}"],
# Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+.
AC_CACHE_CHECK(yjit stats are broken, rb_cv_broken_yjit_stats, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
@%:@ifdef __aarch64__
asm volatile(".arch armv8-a+lse\nldaddal x0,x0,@<:@sp@:>@");
@%:@endif
]])], [rb_cv_broken_yjit_stats=no], [rb_cv_broken_yjit_stats=yes])
])
AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [
AC_DEFINE(BROKEN_YJIT_STATS, 1)
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[]], [[
@%:@ifdef __aarch64__
asm volatile(".arch armv8-a+lse\n"
"ldaddal xzr, xzr, @<:@sp@:>@");
@%:@endif
]])],
[rb_cv_broken_yjit_stats=no],
[rb_cv_broken_yjit_stats=yes],
[rb_cv_broken_yjit_stats=yes]
)
])
AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [AC_DEFINE(BROKEN_YJIT_STATS, 1)])
)
YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a"