Skip to content

Commit

Permalink
Add ifdef to clear cache
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb authored and k0kubun committed Aug 29, 2022
1 parent 7e22ec7 commit 4024553
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yjit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 4024553

Please sign in to comment.