mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Clear the icache on arm
This commit is contained in:
parent
b1ed4d9b94
commit
7e22ec7439
1 changed files with 4 additions and 0 deletions
4
yjit.c
4
yjit.c
|
@ -78,6 +78,10 @@ rb_yjit_mark_executable(void *mem_block, uint32_t mem_size)
|
|||
rb_bug("Couldn't make JIT page (%p, %lu bytes) executable, errno: %s\n",
|
||||
mem_block, (unsigned long)mem_size, strerror(errno));
|
||||
}
|
||||
|
||||
// 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().
|
||||
__builtin___clear_cache(mem_block, (char *)mem_block + mem_size);
|
||||
}
|
||||
|
||||
# define PTR2NUM(x) (rb_int2inum((intptr_t)(void *)(x)))
|
||||
|
|
Loading…
Add table
Reference in a new issue