From: Bart Oldeman <bartoldeman@users.sourceforge.net>
To: Stas Sergeev <stsp@aknet.ru>
Cc: dosemu <linux-msdos@vger.kernel.org>
Subject: Re: freezes when not emulating CPU
Date: Fri, 18 Sep 2009 08:49:58 -0400 [thread overview]
Message-ID: <c3d607cc0909180549h11b3f1edpfcd04ea68273b6f6@mail.gmail.com> (raw)
In-Reply-To: <4AAE6090.5030603@aknet.ru>
Hello,
> OK, but the point is that I haven't specified
> these flags by hands, so they might be a default
> for dosemu right now. So it have to became sse-safe.
Yes, dosemu needs to be sse-safe. In fact that was the intent of a
change to cpu.h that I already made in April 2007, using fxsave+fninit
when available. But I forgot about ldmxcsr. So I added the ldmxcsr on
Monday.
>> I still think that a simple FPU environment reset is sufficient, no
>> need to restore all the registers, because the DOSEMU FPU code is not
>> interrupted by DOS code.
>
> What if the DOS code (by some crazy chance) also
> uses sse?
Well, if no DOS code would use SSE we would only need to save and
restore the x87 FPU state, and not the SSE state. It is precisely
because of the use of fxsave/fxrstor (without the forgotten ldmxcsr)
that you saw all these exceptions on x86_64 (where SSE is the
default).
It is however possible though extremely rare to find SSE DOS code:
DJGPP gcc happily generates it and it runs. I tested that for example
with a QEMU CPU tester that I ported to DJGPP to test and fix quite a
few bugs in cpuemu recently (it's in src/tests now -- with a Makefile
changes SSE is enabled).
> Have you had a look into that? I only zero out a
> few fields, I guess more should be re-set on a
> hardware reset (or via port I/O). I even thought
> this ought to be entire bzero() except for the few
> fields with pre-defined values, but it appears
> not, which I don't quite understand... and found
> no docs.
No I have no idea either except from what you did, look at Bochs or
other emulators.
> Any idea why I am not receiving the SF e-mails for
> a long time now? I thought dosemu is long ago dead,
> but instead there might just be some problems with
> the notification messages...
I got some bounces recently for you. I'll forward privately, and will
try to add you again.
Bart
next prev parent reply other threads:[~2009-09-18 12:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 10:57 freezes when not emulating CPU (was: MIDI input patch) Stas Sergeev
2009-09-14 13:05 ` Bart Oldeman
2009-09-14 15:26 ` freezes when not emulating CPU Stas Sergeev
2009-09-17 20:37 ` Samuel Bronson
2009-09-17 21:05 ` Stas Sergeev
2009-09-18 12:49 ` Bart Oldeman [this message]
[not found] ` <AE6CA625AD924972A78210F20D55D7BC@kofowork>
2009-09-18 15:25 ` Bart Oldeman
2009-09-18 15:47 ` Gert Koefoed Andersen
2009-09-18 17:27 ` Gert Koefoed Andersen
2009-09-14 17:02 ` freezes when not emulating CPU (was: MIDI input patch) Frank Cox
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=c3d607cc0909180549h11b3f1edpfcd04ea68273b6f6@mail.gmail.com \
--to=bartoldeman@users.sourceforge.net \
--cc=linux-msdos@vger.kernel.org \
--cc=stsp@aknet.ru \
/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