target/riscv: Add support for Zicond extension

The spec can be found in https://github.com/riscv/riscv-zicond.
Two instructions are added:
 - czero.eqz: Moves zero to a register rd, if the condition rs2 is
   equal to zero, otherwise moves rs1 to rd.
 - czero.nez: Moves zero to a register rd, if the condition rs2 is
   nonzero, otherwise moves rs1 to rd.

Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Message-ID: <20230221091009.36545-1-liweiwei@iscas.ac.cn>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
Weiwei Li 2023-02-21 17:10:09 +08:00 committed by Palmer Dabbelt
parent b7fa70e2af
commit b8e1f32cda
No known key found for this signature in database
GPG key ID: 2E1319F35FBB1889
5 changed files with 57 additions and 0 deletions

View file

@ -434,6 +434,7 @@ struct RISCVCPUConfig {
bool ext_zkt;
bool ext_ifencei;
bool ext_icsr;
bool ext_zicond;
bool ext_zihintpause;
bool ext_smstateen;
bool ext_sstc;