Resolves: Coverity CID 1685513
Fixes: 4fec981f18fd ("disas/riscv: Split rvi_opcode_data")
Signed-off-by: Richard Henderson <[email protected]>
---
 disas/riscv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/disas/riscv.c b/disas/riscv.c
index e85dbac0351..ef8b7ff20f9 100644
--- a/disas/riscv.c
+++ b/disas/riscv.c
@@ -2560,7 +2560,6 @@ static const rv_opcode_data *decode_inst_opcode(rv_decode 
*dec, rv_isa isa)
                 }
                 break;
             case 2:
-                return &op_csrrs;
                 if (operand_rs1(inst) == 0) {
                     switch (operand_csr12(inst)) {
                     case 0x001: return &op_frflags;
@@ -2574,7 +2573,7 @@ static const rv_opcode_data *decode_inst_opcode(rv_decode 
*dec, rv_isa isa)
                     case 0xc82: return &op_rdinstreth;
                     }
                 }
-                break;
+                return &op_csrrs;
             case 3: return &op_csrrc;
             case 4:
                 if (dec->cfg && dec->cfg->ext_zimop) {
-- 
2.53.0


Reply via email to