From fb235792a79a97b18b818bc0315737d08e231b35 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 23 Jul 2024 19:57:20 -0700 Subject: Define JR, RET pseudoinstructions (#1555) Symmetric with defining J pseudoinstruction earlier in the same section. Resolves #1253 --- src/rv32.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rv32.adoc b/src/rv32.adoc index 1deda32..64949de 100644 --- a/src/rv32.adoc +++ b/src/rv32.adoc @@ -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 -- cgit v1.1