diff options
author | Richard Henderson | 2019-03-28 22:54:23 +0100 |
---|---|---|
committer | Richard Henderson | 2019-06-10 16:03:42 +0200 |
commit | 5e1401969b25f676fee6b1c564441759cf967a43 (patch) | |
tree | 7ad13ea2a9043d2586c1e6f57ea5055e01354cf4 /qom | |
parent | cpu: Introduce CPUNegativeOffsetState (diff) | |
download | qemu-5e1401969b25f676fee6b1c564441759cf967a43.tar.gz qemu-5e1401969b25f676fee6b1c564441759cf967a43.tar.xz qemu-5e1401969b25f676fee6b1c564441759cf967a43.zip |
cpu: Move icount_decr to CPUNegativeOffsetState
Amusingly, we had already ignored the comment to keep this value
at the end of CPUState. This restores the minimum negative offset
from TCG_AREG0 for code generation.
For the couple of uses within qom/cpu.c, without NEED_CPU_H, add
a pointer from the CPUState object to the IcountDecr object within
CPUNegativeOffsetState.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'qom')
-rw-r--r-- | qom/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -115,7 +115,7 @@ void cpu_exit(CPUState *cpu) atomic_set(&cpu->exit_request, 1); /* Ensure cpu_exec will see the exit request after TCG has exited. */ smp_wmb(); - atomic_set(&cpu->icount_decr.u16.high, -1); + atomic_set(&cpu->icount_decr_ptr->u16.high, -1); } int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu, @@ -264,7 +264,7 @@ static void cpu_common_reset(CPUState *cpu) cpu->mem_io_pc = 0; cpu->mem_io_vaddr = 0; cpu->icount_extra = 0; - atomic_set(&cpu->icount_decr.u32, 0); + atomic_set(&cpu->icount_decr_ptr->u32, 0); cpu->can_do_io = 1; cpu->exception_index = -1; cpu->crash_occurred = false; |