From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGBYE-0006Pj-JP for qemu-devel@nongnu.org; Wed, 10 Nov 2010 09:21:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGBYD-0003Dv-Cw for qemu-devel@nongnu.org; Wed, 10 Nov 2010 09:21:26 -0500 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:60995 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGBYD-0003Da-1n for qemu-devel@nongnu.org; Wed, 10 Nov 2010 09:21:25 -0500 Date: Wed, 10 Nov 2010 17:19:30 +0300 (MSK) From: malc Subject: Re: [Qemu-devel] Bug report about x86 'bt' insn In-Reply-To: <86bp5xb6y8.fsf@shell.gmplib.org> Message-ID: References: <86eiay344b.fsf@shell.gmplib.org> <86wroqmhso.fsf@shell.gmplib.org> <20101106185932.GB26083@nightcrawler> <86bp5xb6y8.fsf@shell.gmplib.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Torbjorn Granlund Cc: qemu-devel@nongnu.org, Nathan Froyd On Wed, 10 Nov 2010, Torbjorn Granlund wrote: > malc writes: > > And this one was March 2009 (conveniently having the same file name > 253666), the September 2010 issue reads differently: > > Flags Affected > The CF flag contains the value of the selected bit. The ZF flag is > unaffected. The OF, SF, AF, and PF flags are undefined. > > Have the qemu developers come to any decision on this one? > > I haven't tested many 32-bit x86 implementations, but I think I have > tested all 64-bit x86 implementations, and they all seem to leave ZF > unaffected. (Clearly, it is possible that they do write it for some > values of the operands; there are too many possible values to test.) > > I actually think qemu for both x86-32 and x86-64 should be changed to > make the bt insn not affect ZF. Considering that Intel have changed > their manuals (I have confirmed this) to say that ZF is unaffected, > there are even stronger reasons to change qemu. Even without that > documentation change, I would argue that compatibility with all defacto > hardware is important. > All is the keyword here, i doubt that exhaustive search was performed furthermore, AMDs documentation (to the best of my knowledge still) still maintains that ZF is undefined. That said the bt operation should be changed but for different reasons. > (I am not trying to say that my bug report was correct. It wasn't. I > have fixed the GMP code.) > > -- mailto:av1474@comtv.ru