From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <rth@twiddle.net>
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons
Date: Mon, 15 Jan 2018 09:31:43 -0800 [thread overview]
Message-ID: <2706dc83-cf36-31e9-71d7-ec7ca0cecff0@linaro.org> (raw)
In-Reply-To: <CAFEAcA8TxNTjvsqeHss=7BEm6SzwLHZ54UqDmOPMWA5z0oTsUA@mail.gmail.com>
On 01/15/2018 06:27 AM, Peter Maydell wrote:
> We could avoid the annoying "load LE/GE immediates to tempreg"
> extra code by having tcg_out_cmp2() return a flag to tell
> the caller which way round to put the conditions for its two
> conditional ARITH_MOV insns (for setcond2) or which condition
> to use for the branch (brcond2), right?
No.
We do return a condition to use for the user. When we do the LE/GT load
immediates to temp path, we do apply tcg_cond_swap(cond), which converts the
condition as for swapped arguments, i.e. to GE/LT.
But we can't *not* swap the arguments to the generated comparison. Otherwise
we're computing the wrong thing.
r~
next prev parent reply other threads:[~2018-01-15 17:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 5:39 [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons Richard Henderson
2018-01-10 19:26 ` Michael Roth
2018-01-15 14:27 ` Peter Maydell
2018-01-15 16:18 ` Richard Henderson
2018-01-15 16:27 ` Peter Maydell
2018-01-15 16:46 ` Richard Henderson
2018-01-15 17:31 ` Richard Henderson [this message]
2018-01-15 17:39 ` Richard Henderson
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=2706dc83-cf36-31e9-71d7-ec7ca0cecff0@linaro.org \
--to=richard.henderson@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).