Skip to content

Commit d2ddc14

Browse files
Linda-NjauThinkOpenly
authored andcommitted
Add names for more base instructions
1 parent a64bd35 commit d2ddc14

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

model/riscv_insts_base.sail

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,17 @@ function clause execute (BTYPE(imm, rs2, rs1, op)) = {
180180
}
181181

182182
mapping btype_mnemonic : bop <-> string = {
183+
$[name "branch if equal"]
183184
RISCV_BEQ <-> "beq",
185+
$[name "branch if not equal"]
184186
RISCV_BNE <-> "bne",
187+
$[name "branch if less than"]
185188
RISCV_BLT <-> "blt",
189+
$[name "branch if greater than"]
186190
RISCV_BGE <-> "bge",
191+
$[name "branch if less than (unsigned)"]
187192
RISCV_BLTU <-> "bltu",
193+
$[name "branch if greater than or equal to (unsigned)"]
188194
RISCV_BGEU <-> "bgeu"
189195
}
190196

@@ -300,8 +306,11 @@ function clause execute (SHIFTIOP(shamt, rs1, rd, op)) = {
300306
}
301307

302308
mapping shiftiop_mnemonic : sop <-> string = {
309+
$[name "shift left (logical) immediate"]
303310
RISCV_SLLI <-> "slli",
311+
$[name "shift right (logical) immediate"]
304312
RISCV_SRLI <-> "srli",
313+
$[name "shift right (arithmetic) immediate"]
305314
RISCV_SRAI <-> "srai"
306315
}
307316

@@ -649,8 +658,11 @@ function clause execute (SHIFTIWOP(shamt, rs1, rd, op)) = {
649658
}
650659

651660
mapping shiftiwop_mnemonic : sopw <-> string = {
661+
$[name "shift left (logical) immediate word (RV64)"]
652662
RISCV_SLLIW <-> "slliw",
663+
$[name "shift right (logical) immediate word (RV64)"]
653664
RISCV_SRLIW <-> "srliw",
665+
$[name "shift right (arithmetic) immediate word (RV64)"]
654666
RISCV_SRAIW <-> "sraiw"
655667
}
656668

0 commit comments

Comments
 (0)