From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 3/3] tcg: Fix expansion of INDEX_op_not_vec
Date: Tue, 2 Jul 2019 17:05:42 +0200 [thread overview]
Message-ID: <20190702150542.12008-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20190702150542.12008-1-richard.henderson@linaro.org>
This operation can always be emitted, even if we need to
fall back to xor. Adjust the assertions to match.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg-op-vec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c
index c8fdc24f56..6714991bf4 100644
--- a/tcg/tcg-op-vec.c
+++ b/tcg/tcg-op-vec.c
@@ -90,6 +90,9 @@ bool tcg_can_emit_vecop_list(const TCGOpcode *list,
case INDEX_op_bitsel_vec:
/* These opcodes are mandatory and should not be listed. */
g_assert_not_reached();
+ case INDEX_op_not_vec:
+ /* These opcodes have generic expansions using the above. */
+ g_assert_not_reached();
default:
break;
}
@@ -438,11 +441,14 @@ static bool do_op2(unsigned vece, TCGv_vec r, TCGv_vec a, TCGOpcode opc)
void tcg_gen_not_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
{
+ const TCGOpcode *hold_list = tcg_swap_vecop_list(NULL);
+
if (!TCG_TARGET_HAS_not_vec || !do_op2(vece, r, a, INDEX_op_not_vec)) {
TCGv_vec t = tcg_const_ones_vec_matching(r);
tcg_gen_xor_vec(0, r, a, t);
tcg_temp_free_vec(t);
}
+ tcg_swap_vecop_list(hold_list);
}
void tcg_gen_neg_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
--
2.17.1
next prev parent reply other threads:[~2019-07-02 15:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 15:05 [Qemu-devel] [PULL 0/3] tcg patch queue Richard Henderson
2019-07-02 15:05 ` [Qemu-devel] [PULL 1/3] tcg: Fix mmap lock assert on translation failure Richard Henderson
2019-07-02 15:05 ` [Qemu-devel] [PULL 2/3] tcg/riscv: Fix RISC-VH host build failure Richard Henderson
2019-07-02 15:05 ` Richard Henderson [this message]
2019-07-02 21:44 ` [Qemu-devel] [PULL 0/3] tcg patch queue no-reply
2019-07-03 16:21 ` Peter Maydell
2019-07-03 19:38 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2019-07-09 7:50 [Qemu-devel] [PULL v2 for-4.1 0/2] " Richard Henderson
2019-07-09 7:50 ` [Qemu-devel] [PULL 3/3] tcg: Fix expansion of INDEX_op_not_vec 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=20190702150542.12008-4-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--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).