mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 05:25:11 +00:00
tcg/sparc: Make direct jump patching thread-safe
Ensure direct jump patching in SPARC is atomic by using atomic_read()/atomic_set() for code patching. Backports commit 84f79fb7c6e857edc807e4a251338243ce0cbac3 from qemu
This commit is contained in:
parent
a45f8cb49d
commit
7538001da9
|
@ -1614,6 +1614,6 @@ void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
|
|||
the code_gen_buffer can't be larger than 2GB. */
|
||||
tcg_debug_assert(disp == (int32_t)disp);
|
||||
|
||||
*ptr = CALL | (uint32_t)disp >> 2;
|
||||
atomic_set(ptr, deposit32(CALL, 0, 30, disp >> 2));
|
||||
flush_icache_range(jmp_addr, jmp_addr + 4);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue