From: Richard Henderson <richard.henderson@linaro.org>
To: Philipp Tomsich <philipp.tomsich@vrull.eu>, qemu-devel@nongnu.org
Cc: Christoph Muellner <christoph.muellner@vrull.eu>,
Kito Cheng <kito.cheng@sifive.com>,
Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH v4 1/2] target/riscv: refactor Zicond support
Date: Mon, 6 Mar 2023 10:24:04 -0800 [thread overview]
Message-ID: <89519b9f-6e0a-c380-c7c6-e8e615d11eb0@linaro.org> (raw)
In-Reply-To: <20230306152303.281313-1-philipp.tomsich@vrull.eu>
On 3/6/23 07:23, Philipp Tomsich wrote:
> After the original Zicond support was stuck/fell through the cracks on
> the mailing list at v3 (and a different implementation was merged in
> the meanwhile), we need to refactor Zicond to prepare it to be reused
> by XVentanaCondOps.
>
> This commit lifts the common logic out into gen_czero and uses this
> via gen_logic and 2 helper functions (effectively partial closures).
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
For any multi-patch series, you should use a cover letter.
Lacking this causes the set to be missed by tooling.
> -static bool trans_czero_eqz(DisasContext *ctx, arg_czero_eqz *a)
> +/* Emits "$rd = ($rs2 <cond> $zero) ? $zero : $rs1" */
> +static inline void gen_czero(TCGv dest, TCGv src1, TCGv src2, TCGCond cond)
Drop the inline markers and let the compiler choose.
> +static inline void gen_czero_eqz(TCGv dest, TCGv src1, TCGv src2)
> +static inline void gen_czero_nez(TCGv dest, TCGv src1, TCGv src2)
These especially, where we use their function pointer...
> + return gen_logic(ctx, a, gen_czero_eqz);
> + return gen_logic(ctx, a, gen_czero_nez);
here, so they will most definitely exist out-of-line.
Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
prev parent reply other threads:[~2023-03-06 18:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 15:23 [PATCH v4 1/2] target/riscv: refactor Zicond support Philipp Tomsich
2023-03-06 15:23 ` [PATCH v4 2/2] target/riscv: redirect XVentanaCondOps to use the Zicond functions Philipp Tomsich
2023-03-06 18:26 ` Richard Henderson
2023-03-06 18:24 ` Richard Henderson [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=89519b9f-6e0a-c380-c7c6-e8e615d11eb0@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=christoph.muellner@vrull.eu \
--cc=kito.cheng@sifive.com \
--cc=philipp.tomsich@vrull.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).