mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 03:11:09 +00:00
tcg: access cpu->icount_decr.u16.high with atomics
Consistently access u16.high with atomics to avoid undefined behaviour in MTTCG. Note that icount_decr.u16.low is only used in icount mode, so regular accesses to it are OK. Backports part of commit fff42f183ea4c3967405d4c1dce6d97dae4d64c8 from qemu
This commit is contained in:
parent
e01deeb9ba
commit
9ce38c20b9
|
@ -145,7 +145,7 @@ static void cpu_common_reset(CPUState *cpu)
|
|||
cpu->mem_io_pc = 0;
|
||||
cpu->mem_io_vaddr = 0;
|
||||
cpu->icount_extra = 0;
|
||||
cpu->icount_decr.u32 = 0;
|
||||
atomic_set(&cpu->icount_decr.u32, 0);
|
||||
cpu->can_do_io = 0;
|
||||
cpu->exception_index = -1;
|
||||
cpu->crash_occurred = false;
|
||||
|
|
Loading…
Reference in a new issue