From: Chen Gang <chengang@emindsoft.com.cn>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Chen Gang <gang.chen.5i5j@gmail.com>,
ehabkost@redhat.com, rth@twiddle.net
Subject: Re: [PATCH] target: i386: Check float overflow about register stack
Date: Sat, 22 Feb 2020 10:10:09 +0800 [thread overview]
Message-ID: <f3bea474-468b-5818-9f69-5463be6d9b2a@emindsoft.com.cn> (raw)
In-Reply-To: <d893eac5-0b7a-ddfe-2acf-a6f27ab48ccf@redhat.com>
On 2020/2/22 上午12:18, Paolo Bonzini wrote:
> On 21/02/20 15:09, Chen Gang wrote:
>>> - /* XXX: test fptags too */
>>> + if (env->fptags[env->fpstt]) {
>>> + env->fpus |= 0x4100; /* Empty */
>>> + return;
>>> + }
>>> +
>> For fpop overflow, this fix is enough, but for me, we still need
>> foverflow to check fpush/fld*_ST0 overflow.
>>
>> Don't you think we need check fpush/f[i]ld*_ST0 overflow?
>
> After fld/fild or any other push, FXAM ST0 should not return empty in my
> opinion.
>
OK, it sounds reasonable.
After check the intel document for f[i]ld* instructions, it says:
"Set C1 to 1 if stack overflow occurred; set to 0 otherwise".
In helper_fxam_ST0, I guess, we need "env->fpus |= 0x200" (but I don't
know wheter it will be conflict with SIGND(temp)). And we have to still
need foverflow, because all env->fptags being 0 doesn't mean overflow.
Thanks.
next prev parent reply other threads:[~2020-02-22 2:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 3:45 [PATCH] target: i386: Check float overflow about register stack chengang
2020-02-21 8:58 ` Paolo Bonzini
2020-02-21 14:09 ` Chen Gang
2020-02-21 16:18 ` Paolo Bonzini
2020-02-22 2:10 ` Chen Gang [this message]
2020-02-22 2:27 ` Chen Gang
2020-02-22 7:37 ` Paolo Bonzini
2020-02-22 12:25 ` Chen Gang
2020-02-24 12:43 ` Paolo Bonzini
2020-02-25 1:22 ` Chen Gang
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=f3bea474-468b-5818-9f69-5463be6d9b2a@emindsoft.com.cn \
--to=chengang@emindsoft.com.cn \
--cc=ehabkost@redhat.com \
--cc=gang.chen.5i5j@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).