mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
accel/tcg: Replace CPUState.env_ptr with cpu_env()
Reviewed-by: Anton Johansson <anjo@rev.ng> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
ad75a51e84
commit
b77af26e97
58 changed files with 152 additions and 155 deletions
|
@ -427,7 +427,6 @@ struct qemu_work_item;
|
|||
* @num_ases: number of CPUAddressSpaces in @cpu_ases
|
||||
* @as: Pointer to the first AddressSpace, for the convenience of targets which
|
||||
* only have a single AddressSpace
|
||||
* @env_ptr: Pointer to subclass-specific CPUArchState field.
|
||||
* @gdb_regs: Additional GDB registers.
|
||||
* @gdb_num_regs: Number of total registers accessible to GDB.
|
||||
* @gdb_num_g_regs: Number of registers in GDB 'g' packets.
|
||||
|
@ -501,8 +500,6 @@ struct CPUState {
|
|||
AddressSpace *as;
|
||||
MemoryRegion *memory;
|
||||
|
||||
CPUArchState *env_ptr;
|
||||
|
||||
CPUJumpCache *tb_jmp_cache;
|
||||
|
||||
struct GDBRegisterState *gdb_regs;
|
||||
|
@ -582,6 +579,12 @@ struct CPUState {
|
|||
QEMU_BUILD_BUG_ON(offsetof(CPUState, neg) !=
|
||||
sizeof(CPUState) - sizeof(CPUNegativeOffsetState));
|
||||
|
||||
static inline CPUArchState *cpu_env(CPUState *cpu)
|
||||
{
|
||||
/* We validate that CPUArchState follows CPUState in cpu-all.h. */
|
||||
return (CPUArchState *)(cpu + 1);
|
||||
}
|
||||
|
||||
typedef QTAILQ_HEAD(CPUTailQ, CPUState) CPUTailQ;
|
||||
extern CPUTailQ cpus;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue