qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Artyom Tarasenko <atar4qemu@gmail.com>
Cc: Jakub Jermar <jakub@jermar.eu>,
	HelenOS development mailing list <helenos-devel@lists.modry.cz>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation
Date: Fri, 1 Jul 2011 17:20:16 +0200	[thread overview]
Message-ID: <BANLkTikrR5nzYpm_dmK=9dMqW2oZbhOi-Q@mail.gmail.com> (raw)
In-Reply-To: <CACXAS8A0M+9Les65nmMNr0HzH_ecNxXZjm5eKezU4VzvyzbuGQ@mail.gmail.com>

On Fri, Jul 1, 2011 at 5:03 PM, Artyom Tarasenko <atar4qemu@gmail.com> wrote:
[...]
>> I find it odd that udivx is using cpu_cc_src and cpu_cc_src2.  Using
>> dedicated local temps seems to fix the issue.
>
> Do we need to copy cpu_src* to further temps at all? IMHO
>
> -                        tcg_gen_mov_tl(cpu_cc_src, cpu_src1);
> -                        tcg_gen_mov_tl(cpu_cc_src2, cpu_src2);
> -                        gen_trap_ifdivzero_tl(cpu_cc_src2);
> -                        tcg_gen_divu_i64(cpu_dst, cpu_cc_src, cpu_cc_src2);
> +                        gen_trap_ifdivzero_tl(cpu_src2);
> +                        tcg_gen_divu_i64(cpu_dst, cpu_src1, cpu_src2);
>
> should do it. Or cpu_src is what you mean by dedicated?

You have to use two local temps here to store cpu_src1
and cpu_src2 because gen_trap_ifdivzero_tl uses
tcg_gen_brcondi_tl (cf tcg/README comment about
local usage and jumps).  Note you'll have to do something
similar in gen_op_sdivx.


Laurent

  reply	other threads:[~2011-07-01 15:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 21:12 [Qemu-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation Jakub Jermar
2011-07-01  9:15 ` [Qemu-devel] [HelenOS-devel] " Artyom Tarasenko
2011-07-01  9:36   ` Jakub Jermar
2011-07-01 10:41     ` Artyom Tarasenko
2011-07-01 12:57       ` Jakub Jermar
2011-07-01 14:11         ` Jakub Jermar
2011-07-01 14:24           ` Laurent Desnogues
2011-07-01 14:28             ` Jakub Jermar
2011-07-01 15:08               ` Artyom Tarasenko
2011-07-01 14:15         ` Laurent Desnogues
2011-07-01 14:21           ` Jakub Jermar
2011-07-01 15:03           ` Artyom Tarasenko
2011-07-01 15:20             ` Laurent Desnogues [this message]
2011-07-01 15:53               ` Artyom Tarasenko
2011-07-01 16:14                 ` Artyom Tarasenko

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='BANLkTikrR5nzYpm_dmK=9dMqW2oZbhOi-Q@mail.gmail.com' \
    --to=laurent.desnogues@gmail.com \
    --cc=atar4qemu@gmail.com \
    --cc=helenos-devel@lists.modry.cz \
    --cc=jakub@jermar.eu \
    --cc=qemu-devel@nongnu.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).