From: malc <av1474@comtv.ru>
To: Torbjorn Granlund <tg@gmplib.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Bug report about x86 'bt' insn
Date: Sat, 6 Nov 2010 20:16:13 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.00.1011062015030.1406@linmac> (raw)
In-Reply-To: <86eiay344b.fsf@shell.gmplib.org>
On Sat, 6 Nov 2010, Torbjorn Granlund wrote:
> [This is a bug report, reported here since I was redirected to some
> corporate site when attempting to follow the recommended bug report
> practice. If I am really required to register an account with a
> corporation in order to report a qemu bug, and that bug reports are not
> accepted here, then please accept my apology; I suggest that you simply
> ignore this bug report.]
>
> Bug report:
>
> Qemu version: 0.13.0 (installed via FreeBSD's ports system).
>
> Host: FreeBSD 8.1 amd64 (without any relevant kernel modules)
>
> Guest environments where problem has been reproduced: (1) Debian GNU/Linux
> 5, (2) Debian GNU/kFreeBSD snapshot, (3) FreeBSD 8.1
>
> Problem: The bt insn works incorrectly under qemu. It incorrectly sets
> the Z flag. The bt insn should only affect the carry flag. (This
> causes the GMP library to work incorrectly.)
>
> Test code snippet:
>
> .text
> .globl main
> main: mov $1, %eax
> and %eax, %eax
> bt $0, %eax
> jz 1f
> xor %eax, %eax
> 1: ret
>
> Assembly and execute. Correct behaviour is to exit(0). Under qemu it
> it exits with value 1.
ZF is undefined according to AMD's 24594.pdf page 69.
>
> (I thought qemu wouldn't interfere with plain user mode instructions
> when the host system can handle all the guest systems's instructions,
> and that they would execute natively and at full speed. This bug
> suggests that buggy emulation is taking place.)
>
>
--
mailto:av1474@comtv.ru
next prev parent reply other threads:[~2010-11-06 17:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 14:42 [Qemu-devel] Bug report about x86 'bt' insn Torbjorn Granlund
2010-11-06 17:16 ` malc [this message]
2010-11-06 18:24 ` Torbjorn Granlund
2010-11-06 18:55 ` malc
2010-11-06 18:59 ` Nathan Froyd
2010-11-06 19:22 ` malc
2010-11-06 19:25 ` malc
2010-11-10 14:15 ` Torbjorn Granlund
2010-11-10 14:19 ` malc
2010-11-10 14:38 ` Torbjorn Granlund
2010-11-10 15:08 ` malc
2010-11-10 15:45 ` malc
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=alpine.LNX.2.00.1011062015030.1406@linmac \
--to=av1474@comtv.ru \
--cc=qemu-devel@nongnu.org \
--cc=tg@gmplib.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).