mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Add ifdef to clear cache
This commit is contained in:
parent
7e22ec7439
commit
4024553d13
1 changed files with 2 additions and 0 deletions
2
yjit.c
2
yjit.c
|
@ -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
|
// 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().
|
// 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);
|
__builtin___clear_cache(mem_block, (char *)mem_block + mem_size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
# define PTR2NUM(x) (rb_int2inum((intptr_t)(void *)(x)))
|
# define PTR2NUM(x) (rb_int2inum((intptr_t)(void *)(x)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue