aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-03-28 11:54:23 -1000
committerRichard Henderson <richard.henderson@linaro.org>2019-06-10 07:03:42 -0700
commit5e1401969b25f676fee6b1c564441759cf967a43 (patch)
tree7ad13ea2a9043d2586c1e6f57ea5055e01354cf4 /qom
parent5b146dc716cfd247f99556c04e6e46fbd67565a0 (diff)
downloadqemu-5e1401969b25f676fee6b1c564441759cf967a43.zip
qemu-5e1401969b25f676fee6b1c564441759cf967a43.tar.gz
qemu-5e1401969b25f676fee6b1c564441759cf967a43.tar.bz2
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qom/cpu.c b/qom/cpu.c
index 3c5493c..6b4632a 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -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;