mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
util: Enhance flush_icache_range with separate data pointer
We are shortly going to have a split rw/rx jit buffer. Depending on the host, we need to flush the dcache at the rw data pointer and flush the icache at the rx code pointer. For now, the two passed pointers are identical, so there is no effective change in behaviour. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -1836,7 +1836,7 @@ void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_addr,
|
||||
if (!USE_REG_TB) {
|
||||
qatomic_set((uint32_t *)jmp_addr,
|
||||
deposit32(CALL, 0, 30, br_disp >> 2));
|
||||
flush_icache_range(jmp_addr, jmp_addr + 4);
|
||||
flush_idcache_range(jmp_addr, jmp_addr, 4);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1860,5 +1860,5 @@ void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_addr,
|
||||
}
|
||||
|
||||
qatomic_set((uint64_t *)jmp_addr, deposit64(i2, 32, 32, i1));
|
||||
flush_icache_range(jmp_addr, jmp_addr + 8);
|
||||
flush_idcache_range(jmp_addr, jmp_addr, 8);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user