target/riscv: refactor Zicond support
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>
Tue, 7 Mar 2023 18:07:07 +0000 (19:07 +0100)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 5 May 2023 00:49:50 +0000 (10:49 +1000)
commit378e43fa722a501fbf94f81fa89a87a7a78dddcb
tree85ddcb1f0393809bfa56c0af23fee16da4c62dd7
parentd53ae79b2895218c03a1e5e5c83049567215ab2e
target/riscv: refactor Zicond support

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).

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230307180708.302867-2-philipp.tomsich@vrull.eu>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/insn_trans/trans_rvzicond.c.inc