Skip to content

Commit

Permalink
Add names for more base instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda-Njau authored and ThinkOpenly committed Aug 22, 2024
1 parent 5c3aad8 commit fe49759
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions model/riscv_insts_base.sail
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,17 @@ function clause execute (BTYPE(imm, rs2, rs1, op)) = {
}

mapping btype_mnemonic : bop <-> string = {
$[name "branch if equal"]
RISCV_BEQ <-> "beq",
$[name "branch if not equal"]
RISCV_BNE <-> "bne",
$[name "branch if less than"]
RISCV_BLT <-> "blt",
$[name "branch if greater than"]
RISCV_BGE <-> "bge",
$[name "branch if less than (unsigned)"]
RISCV_BLTU <-> "bltu",
$[name "branch if greater than or equal to (unsigned)"]
RISCV_BGEU <-> "bgeu"
}

Expand Down Expand Up @@ -295,8 +301,11 @@ function clause execute (SHIFTIOP(shamt, rs1, rd, op)) = {
}

mapping shiftiop_mnemonic : sop <-> string = {
$[name "shift left (logical) immediate"]
RISCV_SLLI <-> "slli",
$[name "shift right (logical) immediate"]
RISCV_SRLI <-> "srli",
$[name "shift right (arithmetic) immediate"]
RISCV_SRAI <-> "srai"
}

Expand Down Expand Up @@ -644,8 +653,11 @@ function clause execute (SHIFTIWOP(shamt, rs1, rd, op)) = {
}

mapping shiftiwop_mnemonic : sopw <-> string = {
$[name "shift left (logical) immediate word (RV64)"]
RISCV_SLLIW <-> "slliw",
$[name "shift right (logical) immediate word (RV64)"]
RISCV_SRLIW <-> "srliw",
$[name "shift right (arithmetic) immediate word (RV64)"]
RISCV_SRAIW <-> "sraiw"
}

Expand Down

0 comments on commit fe49759

Please sign in to comment.