-
Notifications
You must be signed in to change notification settings - Fork 14
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 names for cext instructions #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these are challenging. Thanks for taking it on. I have a few comments inline.
model/riscv_insts_cext.sail
Outdated
@@ -15,6 +15,7 @@ | |||
*/ | |||
|
|||
/* ****************************************************************** */ | |||
$[name "no operation (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a hyphen: no-operation
model/riscv_insts_cext.sail
Outdated
@@ -25,7 +26,7 @@ function clause execute C_NOP() = RETIRE_SUCCESS | |||
mapping clause assembly = C_NOP() <-> "c.nop" | |||
|
|||
/* ****************************************************************** */ | |||
|
|||
$[name "add zero_extend non-zero immediate scaled by 4 to stack pointer (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a mouthful. can't think of an obviously better name, though.
Let's change "zero_extend" to "zero-extended", though, to match the documentation.
model/riscv_insts_cext.sail
Outdated
@@ -185,6 +194,7 @@ mapping clause assembly = C_LI(imm, rd) | |||
if rd != zreg | |||
|
|||
/* ****************************************************************** */ | |||
$[name "add non-zero sign-extended immediate scaled by 16 to stack pointer(compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a space between "pointer" and "(compressed)"
model/riscv_insts_cext.sail
Outdated
@@ -221,6 +232,7 @@ mapping clause assembly = C_LUI(imm, rd) | |||
if rd != zreg & rd != sp & imm != 0b000000 | |||
|
|||
/* ****************************************************************** */ | |||
$[name "shift immediate (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"shift right (logical) immediate (compressed)"
model/riscv_insts_cext.sail
Outdated
@@ -239,6 +251,7 @@ mapping clause assembly = C_SRLI(shamt, rsd) | |||
if shamt != 0b000000 | |||
|
|||
/* ****************************************************************** */ | |||
$[name "shift immediate (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"shift right (arithmetic) immediate (compressed)"
model/riscv_insts_cext.sail
Outdated
@@ -381,6 +402,7 @@ mapping clause assembly = C_J(imm) | |||
<-> "c.j" ^ spc() ^ hex_bits_signed_11(imm) | |||
|
|||
/* ****************************************************************** */ | |||
$[name "branch if equal zero (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equals
model/riscv_insts_cext.sail
Outdated
@@ -393,6 +415,7 @@ mapping clause assembly = C_BEQZ(imm, rs) | |||
<-> "c.beqz" ^ spc() ^ creg_name(rs) ^ sep() ^ hex_bits_signed_8(imm) | |||
|
|||
/* ****************************************************************** */ | |||
$[name "branch if contain non-zero (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"branch if not equals zero (compressed)"
model/riscv_insts_cext.sail
Outdated
@@ -405,6 +428,7 @@ mapping clause assembly = C_BNEZ(imm, rs) | |||
<-> "c.bnez" ^ spc() ^ creg_name(rs) ^ sep() ^ hex_bits_signed_8(imm) | |||
|
|||
/* ****************************************************************** */ | |||
$[name "shift immediate (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"shift left (logical) immediate (compressed)"
model/riscv_insts_cext.sail
Outdated
@@ -421,6 +445,7 @@ mapping clause assembly = C_SLLI(shamt, rsd) | |||
if shamt != 0b000000 & rsd != zreg | |||
|
|||
/* ****************************************************************** */ | |||
$[name "load word to stack pointer (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"load word from stack pointer (compressed)"
model/riscv_insts_cext.sail
Outdated
@@ -439,6 +464,7 @@ mapping clause assembly = C_LWSP(uimm, rd) | |||
if rd != zreg | |||
|
|||
/* ****************************************************************** */ | |||
$[name "load double-word to stack pointer (compressed)"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/to/from/
No description provided.