[前][次][番号順一覧][スレッド一覧]

ruby-changes:73223

From: Maxime <ko1@a...>
Date: Tue, 30 Aug 2022 01:03:06 +0900 (JST)
Subject: [ruby-changes:73223] 4024553d13 (master): Add ifdef to clear cache

https://git.ruby-lang.org/ruby.git/commit/?id=4024553d13

From 4024553d131012c313d08b4939f3596b6044c077 Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Fri, 22 Jul 2022 12:21:19 -0400
Subject: Add ifdef to clear cache

---
 yjit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/yjit.c b/yjit.c
index a0c5c09091..584f909473 100644
--- a/yjit.c
+++ b/yjit.c
@@ -81,7 +81,9 @@ rb_yjit_mark_executable(void *mem_block, uint32_t mem_size) https://github.com/ruby/ruby/blob/trunk/yjit.c#L81
 
     // Clear/invalidate the instruction cache. Compiles to nothing on x86_64
     // but required on ARM. On Darwin it's the same as calling sys_icache_invalidate().
+#ifdef __GNUC__
     __builtin___clear_cache(mem_block, (char *)mem_block + mem_size);
+#endif
 }
 
 # define PTR2NUM(x)   (rb_int2inum((intptr_t)(void *)(x)))
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]