Skip to content

Commit

Permalink
Add names for Zbs instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda-Njau authored and ThinkOpenly committed Jul 12, 2024
1 parent e52650d commit 456eecb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions model/riscv_insts_zbs.sail
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ mapping clause encdec = ZBS_IOP(shamt, rs1, rd, RISCV_BSETI) if extension("Zbs")
<-> 0b001010 @ shamt @ rs1 @ 0b001 @ rd @ 0b0010011 if extension("Zbs") & (sizeof(xlen) == 64 | shamt[5] == bitzero)

mapping zbs_iop_mnemonic : biop_zbs <-> string = {
$[name "Single-Bit Clear (Immediate)"]
RISCV_BCLRI <-> "bclri",
$[name "Single-Bit Extract (Immediate)"]
RISCV_BEXTI <-> "bexti",
$[name "Single-Bit Invert (Immediate)"]
RISCV_BINVI <-> "binvi",
$[name "Single-Bit Set (Immediate)"]
RISCV_BSETI <-> "bseti"
}

Expand Down Expand Up @@ -62,9 +66,13 @@ mapping clause encdec = ZBS_RTYPE(rs2, rs1, rd, RISCV_BSET) if extension("Zbs")
<-> 0b0010100 @ rs2 @ rs1 @ 0b001 @ rd @ 0b0110011 if extension("Zbs")

mapping zbs_rtype_mnemonic : brop_zbs <-> string = {
$[name "Single-Bit Clear (Register)"]
RISCV_BCLR <-> "bclr",
$[name "Single-Bit Extract (Register)"]
RISCV_BEXT <-> "bext",
$[name "Single-Bit Invert (Register)"]
RISCV_BINV <-> "binv",
$[name "Single-Bit Set (Register)"]
RISCV_BSET <-> "bset"
}

Expand Down

0 comments on commit 456eecb

Please sign in to comment.