summaryrefslogtreecommitdiffstats
path: root/target/i386/hvf/x86_emu.c
diff options
context:
space:
mode:
authorRoman Bolshakov2020-05-28 21:37:53 +0200
committerPaolo Bonzini2020-06-12 17:15:02 +0200
commit967f4da2afb2ece8b2b054bc8af23389e028fdcc (patch)
treef2f2ad47bfa96b4f0947206a3ae67cfab7e4e385 /target/i386/hvf/x86_emu.c
parenti386: hvf: Drop fetch_rip from HVFX86EmulatorState (diff)
downloadqemu-967f4da2afb2ece8b2b054bc8af23389e028fdcc.tar.gz
qemu-967f4da2afb2ece8b2b054bc8af23389e028fdcc.tar.xz
qemu-967f4da2afb2ece8b2b054bc8af23389e028fdcc.zip
i386: hvf: Drop rflags from HVFX86EmulatorState
HVFX86EmulatorState carries it's own copy of x86 flags. It can be dropped in favor of eflags in generic CPUX86State. Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200528193758.51454-9-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/hvf/x86_emu.c')
-rw-r--r--target/i386/hvf/x86_emu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c
index 0efd9f9928..04fac64e72 100644
--- a/target/i386/hvf/x86_emu.c
+++ b/target/i386/hvf/x86_emu.c
@@ -459,7 +459,7 @@ static inline void string_increment_reg(struct CPUX86State *env, int reg,
struct x86_decode *decode)
{
target_ulong val = read_reg(env, reg, decode->addressing_size);
- if (env->hvf_emul->rflags.df) {
+ if (env->eflags & DF_MASK) {
val -= decode->operand_size;
} else {
val += decode->operand_size;
@@ -1432,7 +1432,7 @@ void load_regs(struct CPUState *cpu)
RRX(env, i) = rreg(cpu->hvf_fd, HV_X86_RAX + i);
}
- RFLAGS(env) = rreg(cpu->hvf_fd, HV_X86_RFLAGS);
+ env->eflags = rreg(cpu->hvf_fd, HV_X86_RFLAGS);
rflags_to_lflags(env);
env->eip = rreg(cpu->hvf_fd, HV_X86_RIP);
}
@@ -1456,7 +1456,7 @@ void store_regs(struct CPUState *cpu)
}
lflags_to_rflags(env);
- wreg(cpu->hvf_fd, HV_X86_RFLAGS, RFLAGS(env));
+ wreg(cpu->hvf_fd, HV_X86_RFLAGS, env->eflags);
macvm_set_rip(cpu, env->eip);
}