Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Zmmul #122

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions model/riscv_insts_mext.sail
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ mapping clause encdec = MUL(rs2, rs1, rd, high, signed1, signed2)
<-> 0b0000001 @ rs2 @ rs1 @ encdec_mul_op(high, signed1, signed2) : bits(3) @ rd @ 0b0110011

function clause execute (MUL(rs2, rs1, rd, high, signed1, signed2)) = {
if haveMulDiv() then {
if haveMulDiv() | haveZmmul() then {
let rs1_val = X(rs1);
let rs2_val = X(rs2);
let rs1_int : int = if signed1 then signed(rs1_val) else unsigned(rs1_val);
Expand Down Expand Up @@ -177,7 +177,7 @@ mapping clause encdec = MULW(rs2, rs1, rd)
if sizeof(xlen) == 64

function clause execute (MULW(rs2, rs1, rd)) = {
if haveMulDiv() then {
if haveMulDiv() | haveZmmul() then {
let rs1_val = X(rs1)[31..0];
let rs2_val = X(rs2)[31..0];
let rs1_int : int = signed(rs1_val);
Expand Down
2 changes: 2 additions & 0 deletions model/riscv_sys_regs.sail
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ function haveZknh() -> bool = true
function haveZkne() -> bool = true
function haveZknd() -> bool = true

function haveZmmul() -> bool = true

bitfield Mstatush : bits(32) = {
MBE : 5,
SBE : 4
Expand Down