Skip to content

Commit

Permalink
Define JR, RET pseudoinstructions (#1555)
Browse files Browse the repository at this point in the history
Symmetric with defining J pseudoinstruction earlier in the same section.

Resolves #1253
  • Loading branch information
aswaterman authored Jul 24, 2024
1 parent bc6a9b7 commit fb23579
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rv32.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,12 @@ instruction following the jump (`pc`+4) is written to register _rd_.
Register `x0` can be used as the destination if the result is not
required.

Plain unconditional indirect jumps (assembler pseudoinstruction JR) are
encoded as a JALR with _rd_=`x0`.
Procedure returns in the standard calling convention (assembler
pseudoinstruction RET) are encoded as a JALR with _rd_=`x0`, _rs1_=`x1`, and
_imm_=0.

include::images/wavedrom/ct-unconditional-2.adoc[]
[[ct-unconditional-2]]
//.The indirect unconditional-jump instruction, JALR
Expand Down

0 comments on commit fb23579

Please sign in to comment.