From: Rob Landley <rob@landley.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [RFC PATCH 1/3] target-i386: Add 486sx, old486, and old486sx CPU models
Date: Fri, 29 Mar 2013 00:10:04 -0500 [thread overview]
Message-ID: <1364533804.18069.9@driftwood> (raw)
In-Reply-To: <5154A41B.2030609@zytor.com> (from hpa@zytor.com on Thu Mar 28 15:12:11 2013)
On 03/28/2013 03:12:11 PM, H. Peter Anvin wrote:
> On 03/28/2013 12:15 PM, Aurelien Jarno wrote:
> >
> > This really looks like Linux kernel specific. I haven't been able to
> > test on a real machine, but the documentation I have found suggest
> that
> > without and x87 FPU, the FPU instructions are simply ignored. The
> common
> > way to detect an FPU is therefore to initialize registers to a given
> > value, run fnstsw and fnstcw instructions with the register in
> arguments
> > and see if they have been modified.
> >
> > The Linux kernel indeed set the initial value of these registers to
> > 0xffff, but I am not sure all codes are doing the same.
> >
> > For me it looks like better to skip such instructions directly in
> > translate.c. As a bonus it seems easy to do that for all FPU
> > instructions.
> >
>
> It might have been (and this is from memory, so don't take it for
> anything) that the register form receives 0xffff, but the memory form
> is
> ignored.
Speaking of which, Solar Designer recently found a bug where pentium 3
silently ignores the 66 prefix that later became SSE2, and thus the
code ran but produced the wrong result:
https://twitter.com/solardiz/status/316204216962142209
https://twitter.com/solardiz/status/316207184134410240
But this isn't what QEMU does:
https://twitter.com/solardiz/status/316944417871245313
Rob
next prev parent reply other threads:[~2013-03-29 5:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1362017554-1260-1-git-send-email-hpa@zytor.com>
2013-03-24 5:06 ` [Qemu-devel] [RFC PATCH 1/3] target-i386: Add 486sx, old486, and old486sx CPU models H. Peter Anvin
2013-03-25 9:06 ` Paolo Bonzini
2013-03-25 9:23 ` Andreas Färber
[not found] ` <1362017554-1260-3-git-send-email-hpa@zytor.com>
2013-03-25 9:05 ` [Qemu-devel] [RFC PATCH 3/3] mc146818rtc: export the timezone information Paolo Bonzini
2013-03-25 15:47 ` H. Peter Anvin
2013-03-25 15:51 ` Paolo Bonzini
2013-03-25 9:39 ` [Qemu-devel] [RFC PATCH 1/3] target-i386: Add 486sx, old486, and old486sx CPU models Andreas Färber
2013-03-25 15:15 ` Igor Mammedov
2013-03-25 18:44 ` H. Peter Anvin
2013-03-25 19:05 ` Eduardo Habkost
2013-03-25 20:45 ` H. Peter Anvin
2013-03-25 20:56 ` Eduardo Habkost
2013-03-25 20:56 ` H. Peter Anvin
2014-01-07 5:53 ` H. Peter Anvin
2014-01-07 9:08 ` Igor Mammedov
2013-03-25 20:47 ` H. Peter Anvin
2013-03-25 19:01 ` Eduardo Habkost
[not found] ` <1362017554-1260-2-git-send-email-hpa@zytor.com>
2013-03-28 19:15 ` [Qemu-devel] [RFC PATCH 2/3] target-i386: Raise #UD on accessing non-existent control registers Aurelien Jarno
2013-03-28 19:15 ` [Qemu-devel] [RFC PATCH 1/3] target-i386: Add 486sx, old486, and old486sx CPU models Aurelien Jarno
2013-03-28 20:02 ` H. Peter Anvin
2013-03-28 20:12 ` H. Peter Anvin
2013-03-29 5:10 ` Rob Landley [this message]
2013-03-29 5:25 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364533804.18069.9@driftwood \
--to=rob@landley.net \
--cc=aurelien@aurel32.net \
--cc=hpa@zytor.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).