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 names for cext instructions #40

Merged
merged 7 commits into from
Aug 15, 2024
Merged

Conversation

Linda-Njau
Copy link

No description provided.

Copy link
Owner

@ThinkOpenly ThinkOpenly left a 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.

@@ -15,6 +15,7 @@
*/

/* ****************************************************************** */
$[name "no operation (compressed)"]
Copy link
Owner

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

@@ -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)"]
Copy link
Owner

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.

@@ -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)"]
Copy link
Owner

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)"

@@ -221,6 +232,7 @@ mapping clause assembly = C_LUI(imm, rd)
if rd != zreg & rd != sp & imm != 0b000000

/* ****************************************************************** */
$[name "shift immediate (compressed)"]
Copy link
Owner

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)"

@@ -239,6 +251,7 @@ mapping clause assembly = C_SRLI(shamt, rsd)
if shamt != 0b000000

/* ****************************************************************** */
$[name "shift immediate (compressed)"]
Copy link
Owner

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)"

@@ -381,6 +402,7 @@ mapping clause assembly = C_J(imm)
<-> "c.j" ^ spc() ^ hex_bits_signed_11(imm)

/* ****************************************************************** */
$[name "branch if equal zero (compressed)"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equals

@@ -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)"]
Copy link
Owner

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)"

@@ -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)"]
Copy link
Owner

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)"

@@ -421,6 +445,7 @@ mapping clause assembly = C_SLLI(shamt, rsd)
if shamt != 0b000000 & rsd != zreg

/* ****************************************************************** */
$[name "load word to stack pointer (compressed)"]
Copy link
Owner

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)"

@@ -439,6 +464,7 @@ mapping clause assembly = C_LWSP(uimm, rd)
if rd != zreg

/* ****************************************************************** */
$[name "load double-word to stack pointer (compressed)"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/to/from/

@ThinkOpenly ThinkOpenly merged commit 5c3aad8 into ThinkOpenly:JSON Aug 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants