From: malc <av1474@comtv.ru>
To: Torbjorn Granlund <tg@gmplib.org>
Cc: qemu-devel@nongnu.org, Nathan Froyd <froydnj@codesourcery.com>
Subject: Re: [Qemu-devel] Bug report about x86 'bt' insn
Date: Wed, 10 Nov 2010 18:45:37 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.00.1011101844570.4384@linmac> (raw)
In-Reply-To: <alpine.LNX.2.00.1011101807490.2138@linmac>
On Wed, 10 Nov 2010, malc wrote:
> On Wed, 10 Nov 2010, Torbjorn Granlund wrote:
>
> > malc <av1474@comtv.ru> writes:
> >
> > 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.
> >
> > AMD indeed still says undefined in their documentation (as of two hours
> > ago). I have asked AMD for a clarification, mainly to make sure they
> > are aware of Intel's documentation change.
> >
> > (I am not certain about what you doubt. As I said, I did not check all
> > 2^64 operand values combined all possible bt bit position arguments. I
> > believe I have checked all 64-bit x86 processors implementations [two
> > generations of Core2, NHM and WSM based Core ix, Via Nano, as well as all
> > Athlon64/Opteron generations).)
>
> I meant all CPU variants.
Anyways:
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 7b6e3c2..f416dce 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -6536,8 +6536,7 @@ static target_ulong disas_insn(DisasContext *s,
target_ulong pc_start)
tcg_gen_andi_tl(cpu_T[1], cpu_T[1], (1 << (3 + ot)) - 1);
switch(op) {
case 0:
- tcg_gen_shr_tl(cpu_cc_src, cpu_T[0], cpu_T[1]);
- tcg_gen_movi_tl(cpu_cc_dst, 0);
+ tcg_gen_shr_tl(cpu_tmp4, cpu_T[0], cpu_T[1]);
break;
case 1:
tcg_gen_shr_tl(cpu_tmp4, cpu_T[0], cpu_T[1]);
@@ -6560,7 +6559,14 @@ static target_ulong disas_insn(DisasContext *s,
target_ulong pc_start)
tcg_gen_xor_tl(cpu_T[0], cpu_T[0], cpu_tmp0);
break;
}
- s->cc_op = CC_OP_SARB + ot;
+
+ if (s->cc_op != CC_OP_DYNAMIC)
+ gen_op_set_cc_op(s->cc_op);
+ gen_compute_eflags(cpu_cc_src);
+ tcg_gen_andi_tl(cpu_tmp4, cpu_tmp4, CC_C);
+ tcg_gen_or_tl(cpu_cc_src, cpu_cc_src, cpu_tmp4);
+ s->cc_op = CC_OP_EFLAGS;
+
if (op != 0) {
if (mod != 3)
gen_op_st_T0_A0(ot + s->mem_index);
--
mailto:av1474@comtv.ru
prev parent reply other threads:[~2010-11-10 15:45 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
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 [this message]
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.1011101844570.4384@linmac \
--to=av1474@comtv.ru \
--cc=froydnj@codesourcery.com \
--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).