diff options
| author | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2021-09-11 16:00:12 +0200 |
|---|---|---|
| committer | Alistair Francis <alistair.francis@wdc.com> | 2021-10-07 08:41:33 +1000 |
| commit | 7e68e6c79b9de5c923e478ea6794a5143610b765 (patch) | |
| tree | 99f99cf18c5b3c250571ee8cab71a0d292ac58ec | |
| parent | d7a4fcb03433edefd19b7db3c4d20ed750b5833b (diff) | |
| download | focaccia-qemu-7e68e6c79b9de5c923e478ea6794a5143610b765.tar.gz focaccia-qemu-7e68e6c79b9de5c923e478ea6794a5143610b765.zip | |
target/riscv: Add a REQUIRE_32BIT macro
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 <philipp.tomsich@vrull.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-id: 20210911140016.834071-13-philipp.tomsich@vrull.eu Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to '')
| -rw-r--r-- | target/riscv/translate.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; \ |