diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-10-18 11:53:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 11:53:18 -0700 |
commit | 67252b3d7c72363cd0312bec1fa3293c4db59a65 (patch) | |
tree | 2409875db1fe86c225e3e0d8e2f1267d4d55e371 /riscv/insns/c_lui.h | |
parent | a2e80e1eba4e554a61784be34d50ce7d573cafdc (diff) | |
parent | 762ed3f5c849d1c7f7e9fff6da3712531663d7a8 (diff) | |
download | riscv-isa-sim-67252b3d7c72363cd0312bec1fa3293c4db59a65.zip riscv-isa-sim-67252b3d7c72363cd0312bec1fa3293c4db59a65.tar.gz riscv-isa-sim-67252b3d7c72363cd0312bec1fa3293c4db59a65.tar.bz2 |
Merge pull request #1486 from riscv-software-src/zcmop
Add unratified Zcmop extension
Diffstat (limited to 'riscv/insns/c_lui.h')
-rw-r--r-- | riscv/insns/c_lui.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/riscv/insns/c_lui.h b/riscv/insns/c_lui.h index 956fa44..3e0e02f 100644 --- a/riscv/insns/c_lui.h +++ b/riscv/insns/c_lui.h @@ -2,7 +2,10 @@ require_extension(EXT_ZCA); if (insn.rvc_rd() == 2) { // c.addi16sp require(insn.rvc_addi16sp_imm() != 0); WRITE_REG(X_SP, sext_xlen(RVC_SP + insn.rvc_addi16sp_imm())); -} else { - require(insn.rvc_imm() != 0); +} else if (insn.rvc_imm() != 0) { // c.lui WRITE_RD(insn.rvc_imm() << 12); +} else if ((insn.rvc_rd() & 1) != 0) { // c.mop.N + #include "c_mop_N.h" +} else { + require(false); } |