mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
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>
This commit is contained in:
parent
2d5f696cb7
commit
967f4da2af
7 changed files with 24 additions and 67 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue