|
From: | Paolo Bonzini |
Subject: | Re: [Bug] x86 EFLAGS refresh is not happening correctly |
Date: | Thu, 5 Aug 2021 13:24:12 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 05/08/21 11:51, Stevie Lavern wrote:
Shouldn't it be: eflags = cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK); as eflags is entirely reevaluated by "cpu_cc_compute_all" ?
No, both are wrong. env->eflags contains flags other than the arithmetic flags (OF/SF/ZF/AF/PF/CF) and those have to be preserved.
The right code is in helper_read_eflags. You can move it into cpu_compute_eflags, and make helper_read_eflags use it.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |