1234567891011121314151617181920212223242526272829303132 |
- From 9dee38536585ddbb681e3dd124e02c91fe93604e Mon Sep 17 00:00:00 2001
- From: Frank Chang <frank.chang@sifive.com>
- Date: Wed, 19 May 2021 11:42:06 +0800
- Subject: [PATCH 102/107] target/riscv: fix REQUIRE_ZFH() macro bug
- REQUIRE_ZFH() should return false only when ctx->ext_zfh is 0.
- It should not return the value of ctx->ext_zfh as it's just a
- check function.
- Signed-off-by: Frank Chang <frank.chang@sifive.com>
- ---
- target/riscv/insn_trans/trans_rvzfh.c.inc | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
- diff --git a/target/riscv/insn_trans/trans_rvzfh.c.inc b/target/riscv/insn_trans/trans_rvzfh.c.inc
- index 4c483f6372..0b91de5ae1 100644
- --- a/target/riscv/insn_trans/trans_rvzfh.c.inc
- +++ b/target/riscv/insn_trans/trans_rvzfh.c.inc
- @@ -17,7 +17,9 @@
- */
-
- #define REQUIRE_ZFH(ctx) do { \
- - return ctx->ext_zfh; \
- + if (ctx->ext_zfh == 0) { \
- + return false; \
- + } \
- } while (0)
-
- static bool trans_flh(DisasContext *ctx, arg_flh *a)
- --
- 2.33.1
|