summary refs log tree commit diff stats
path: root/target/i386/emulate/x86_emu.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-05-02 22:21:42 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-05-12 17:48:32 +0200
commit77a2dba45cc9a1be7fec6ab88f43d2fa18af52a3 (patch)
tree757705a4ceddb1b5aa75ddcc12b55abee14ffc9a /target/i386/emulate/x86_emu.h
parentad441b8b7913a26b18edbc076c74ca0cdbfa4ee5 (diff)
downloadfocaccia-qemu-77a2dba45cc9a1be7fec6ab88f43d2fa18af52a3.tar.gz
focaccia-qemu-77a2dba45cc9a1be7fec6ab88f43d2fa18af52a3.zip
target/i386/emulate: stop overloading decode->op[N].ptr
decode->op[N].ptr can contain either a host pointer (!) in CPUState
or a guest virtual address.  Pass the whole struct to read_val_ext
and write_val_ext, so that it can decide the contents based on the
operand type.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/emulate/x86_emu.h')
-rw-r--r--target/i386/emulate/x86_emu.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/i386/emulate/x86_emu.h b/target/i386/emulate/x86_emu.h
index 555b567e2c..a1a961284b 100644
--- a/target/i386/emulate/x86_emu.h
+++ b/target/i386/emulate/x86_emu.h
@@ -42,11 +42,11 @@ void x86_emul_raise_exception(CPUX86State *env, int exception_index, int error_c
 
 target_ulong read_reg(CPUX86State *env, int reg, int size);
 void write_reg(CPUX86State *env, int reg, target_ulong val, int size);
-target_ulong read_val_from_reg(target_ulong reg_ptr, int size);
-void write_val_to_reg(target_ulong reg_ptr, target_ulong val, int size);
-void write_val_ext(CPUX86State *env, target_ulong ptr, target_ulong val, int size);
+target_ulong read_val_from_reg(void *reg_ptr, int size);
+void write_val_to_reg(void *reg_ptr, target_ulong val, int size);
+void write_val_ext(CPUX86State *env, struct x86_decode_op *decode, target_ulong val, int size);
 uint8_t *read_mmio(CPUX86State *env, target_ulong ptr, int bytes);
-target_ulong read_val_ext(CPUX86State *env, target_ulong ptr, int size);
+target_ulong read_val_ext(CPUX86State *env, struct x86_decode_op *decode, int size);
 
 void exec_movzx(CPUX86State *env, struct x86_decode *decode);
 void exec_shl(CPUX86State *env, struct x86_decode *decode);