From: Philipp Tomsich <[email protected]> With the changes to Zb[abcs], there's some encodings that are different in RV64 and RV32 (e.g., for rev8 and zext.h). For these, we'll need a helper macro allowing us to select on RV32, as well.
Signed-off-by: Philipp Tomsich <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Reviewed-by: Bin Meng <[email protected]> Message-id: [email protected] Signed-off-by: Alistair Francis <[email protected]> --- target/riscv/translate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 74b33fa3c9..b2d3444bc5 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -337,6 +337,12 @@ EX_SH(12) } \ } while (0) +#define REQUIRE_32BIT(ctx) do { \ + if (!is_32bit(ctx)) { \ + return false; \ + } \ +} while (0) + #define REQUIRE_64BIT(ctx) do { \ if (is_32bit(ctx)) { \ return false; \ -- 2.31.1
