diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2022-07-22 12:21:19 -0400 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-08-29 08:47:03 -0700 |
commit | 4024553d131012c313d08b4939f3596b6044c077 (patch) | |
tree | 375a7c54ac6ede6f86676a315e833a207fbb3578 /yjit.c | |
parent | 7e22ec7439211d43aea850a4e849f37e631ed131 (diff) |
Add ifdef to clear cache
Diffstat (limited to 'yjit.c')
-rw-r--r-- | yjit.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -81,7 +81,9 @@ rb_yjit_mark_executable(void *mem_block, uint32_t mem_size) // 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))) |