Skip to content

Commit

Permalink
Replace vmandnot and vmornot with vmandn and vmorn - Issue riscv#421 (r…
Browse files Browse the repository at this point in the history
…iscv#465)

Updates the instruction mnemonics for vmandn and vmorn

* replace mnemonics "vmandnot" and "vmornot" with "vmandn" and "vmorn" respectively

* renamed MM_VMORNOT and MM_VMANDNOT to match mnemonics
  • Loading branch information
ShivangMishra authored and KotorinMinami committed May 9, 2024
1 parent 9ba932d commit 4a5cdde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions model/riscv_insts_vext_mask.sail
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ union clause ast = MMTYPE : (mmfunct6, regidx, regidx, regidx)
mapping encdec_mmfunct6 : mmfunct6 <-> bits(6) = {
MM_VMAND <-> 0b011001,
MM_VMNAND <-> 0b011101,
MM_VMANDNOT <-> 0b011000,
MM_VMANDN <-> 0b011000,
MM_VMXOR <-> 0b011011,
MM_VMOR <-> 0b011010,
MM_VMNOR <-> 0b011110,
MM_VMORNOT <-> 0b011100,
MM_VMORN <-> 0b011100,
MM_VMXNOR <-> 0b011111
}

Expand Down Expand Up @@ -51,11 +51,11 @@ function clause execute(MMTYPE(funct6, vs2, vs1, vd)) = {
result[i] = match funct6 {
MM_VMAND => vs2_val[i] & vs1_val[i],
MM_VMNAND => not(vs2_val[i] & vs1_val[i]),
MM_VMANDNOT => vs2_val[i] & not(vs1_val[i]),
MM_VMANDN => vs2_val[i] & not(vs1_val[i]),
MM_VMXOR => vs2_val[i] != vs1_val[i],
MM_VMOR => vs2_val[i] | vs1_val[i],
MM_VMNOR => not(vs2_val[i] | vs1_val[i]),
MM_VMORNOT => vs2_val[i] | not(vs1_val[i]),
MM_VMORN => vs2_val[i] | not(vs1_val[i]),
MM_VMXNOR => vs2_val[i] == vs1_val[i]
}
}
Expand All @@ -69,11 +69,11 @@ function clause execute(MMTYPE(funct6, vs2, vs1, vd)) = {
mapping mmtype_mnemonic : mmfunct6 <-> string = {
MM_VMAND <-> "vmand.mm",
MM_VMNAND <-> "vmnand.mm",
MM_VMANDNOT <-> "vmandnot.mm",
MM_VMANDN <-> "vmandn.mm",
MM_VMXOR <-> "vmxor.mm",
MM_VMOR <-> "vmor.mm",
MM_VMNOR <-> "vmnor.mm",
MM_VMORNOT <-> "vmornot.mm",
MM_VMORN <-> "vmorn.mm",
MM_VMXNOR <-> "vmxnor.mm"
}

Expand Down
2 changes: 1 addition & 1 deletion model/riscv_vreg_type.sail
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum nxfunct6 = { NX_VNCLIPU, NX_VNCLIP}

enum nxsfunct6 = { NXS_VNSRL, NXS_VNSRA }

enum mmfunct6 = { MM_VMAND, MM_VMNAND, MM_VMANDNOT, MM_VMXOR, MM_VMOR, MM_VMNOR, MM_VMORNOT, MM_VMXNOR }
enum mmfunct6 = { MM_VMAND, MM_VMNAND, MM_VMANDN, MM_VMXOR, MM_VMOR, MM_VMNOR, MM_VMORN, MM_VMXNOR }

enum nifunct6 = { NI_VNCLIPU, NI_VNCLIP }

Expand Down

0 comments on commit 4a5cdde

Please sign in to comment.