Skip to content

Commit 690298d

Browse files
authored
Merge pull request #1602 from YenHaoChen/pr-c_lui
Fix c.mop.N decoding
2 parents 066a3c1 + d16f8b0 commit 690298d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

riscv/insns/c_lui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if (insn.rvc_rd() == 2) { // c.addi16sp
44
WRITE_REG(X_SP, sext_xlen(RVC_SP + insn.rvc_addi16sp_imm()));
55
} else if (insn.rvc_imm() != 0) { // c.lui
66
WRITE_RD(insn.rvc_imm() << 12);
7-
} else if ((insn.rvc_rd() & 1) != 0) { // c.mop.N
7+
} else if ((insn.rvc_rd() & 0x11) == 1) { // c.mop.N
88
#include "c_mop_N.h"
99
} else {
1010
require(false);

0 commit comments

Comments
 (0)