We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 50b8a07 + 52fe009 commit 1c9da01Copy full SHA for 1c9da01
src/decode.c
@@ -465,6 +465,8 @@ static inline bool op_op_imm(rv_insn_t *ir, const uint32_t insn)
465
break;
466
case 1: /* SLLI: Shift Left Logical */
467
ir->opcode = rv_insn_slli;
468
+ if (unlikely(ir->imm & (1 << 5)))
469
+ return false;
470
471
case 2: /* SLTI: Set on Less Than Immediate */
472
ir->opcode = rv_insn_slti;
@@ -482,6 +484,8 @@ static inline bool op_op_imm(rv_insn_t *ir, const uint32_t insn)
482
484
ir->opcode = (ir->imm & ~0x1f)
483
485
? rv_insn_srai /* SRAI: Shift Right Arithmetic */
486
: rv_insn_srli; /* SRLI: Shift Right Logical */
487
488
489
490
case 6: /* ORI: OR Immediate */
491
ir->opcode = rv_insn_ori;
0 commit comments