From 99cfb385520d7c06790932ff0ef484d765189543 Mon Sep 17 00:00:00 2001 From: espes Date: Sat, 6 Oct 2018 17:38:19 +1000 Subject: [PATCH] hvf: fix is_host_reg for i386 --- target/i386/hvf/x86_emu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c index 5785c24ed5..a388066585 100644 --- a/target/i386/hvf/x86_emu.c +++ b/target/i386/hvf/x86_emu.c @@ -173,7 +173,7 @@ void write_val_to_reg(uintptr_t reg_ptr, target_ulong val, int size) static bool is_host_reg(struct CPUX86State *env, uintptr_t ptr) { - return (ptr - (target_ulong)&env->hvf_emul->regs[0]) < sizeof(env->hvf_emul->regs); + return (ptr - (uintptr_t)&env->hvf_emul->regs[0]) < sizeof(env->hvf_emul->regs); } void write_val_ext(struct CPUX86State *env, uintptr_t ptr, target_ulong val, int size)