Skip to content

Commit

Permalink
Expand acronyms of C.ADDI16SP/C.ADDI4SPN (#1619)
Browse files Browse the repository at this point in the history
Resolves #1618
  • Loading branch information
aswaterman authored Aug 30, 2024
1 parent 30b8002 commit 8b9dc50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/c-st-ext.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ zero for C.ADDIW, where this corresponds to `sext.w rd`. C.ADDIW is
only valid when `_rd_≠x0`; the code points with
`_rd_=x0` are reserved.

C.ADDI16SP shares the opcode with C.LUI, but has a destination field of
C.ADDI16SP (add immediate to stack pointer)
shares the opcode with C.LUI, but has a destination field of
`x2`. C.ADDI16SP adds the non-zero sign-extended 6-bit immediate to the
value in the stack pointer (`sp=x2`), where the immediate is scaled to
represent multiples of 16 in the range (-512,496). C.ADDI16SP is used to
Expand All @@ -623,7 +624,8 @@ always 16-byte aligned.
include::images/wavedrom/c-ciw.edn[]
//.CIW format.
(((compressed, CIW)))
C.ADDI4SPN is a CIW-format instruction that adds a _zero_-extended
C.ADDI4SPN (add immediate to stack pointer, non-destructive)
is a CIW-format instruction that adds a _zero_-extended
non-zero immediate, scaled by 4, to the stack pointer, `x2`, and writes
the result to `rd′`. This instruction is used to generate
pointers to stack-allocated variables, and expands to
Expand Down

0 comments on commit 8b9dc50

Please sign in to comment.