mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/i386: check for empty register in FXAM
The fxam instruction returns the wrong result after fdecstp or after an underflow. Check fptags to handle this. Reported-by: <chengang@emindsoft.com.cn> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -991,7 +991,11 @@ void helper_fxam_ST0(CPUX86State *env)
|
||||
env->fpus |= 0x200; /* C1 <-- 1 */
|
||||
}
|
||||
|
||||
/* XXX: test fptags too */
|
||||
if (env->fptags[env->fpstt]) {
|
||||
env->fpus |= 0x4100; /* Empty */
|
||||
return;
|
||||
}
|
||||
|
||||
expdif = EXPD(temp);
|
||||
if (expdif == MAXEXPD) {
|
||||
if (MANTD(temp) == 0x8000000000000000ULL) {
|
||||
|
||||
Reference in New Issue
Block a user