From 4dc3fa254ccc54e6f090722810506602ea59dbce Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 9 Jul 2018 15:51:54 -0700 Subject: Make JALR assembly format consistent with binutils (#209) Addresses #145 --- src/c.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/c.tex') diff --git a/src/c.tex b/src/c.tex index 955069f..0b47699 100644 --- a/src/c.tex +++ b/src/c.tex @@ -673,12 +673,12 @@ C.JALR & src$\neq$0 & 0 & C2 \\ These instructions use the CR format. C.JR (jump register) performs an unconditional control transfer to -the address in register {\em rs1}. C.JR expands to {\tt jalr x0, rs1, 0}. +the address in register {\em rs1}. C.JR expands to {\tt jalr x0, 0(rs1)}. C.JALR (jump and link register) performs the same operation as C.JR, but additionally writes the address of the instruction following the jump ({\tt pc}+2) to the link register, {\tt x1}. C.JALR expands to -{\tt jalr x1, rs1, 0}. +{\tt jalr x1, 0(rs1)}. \begin{commentary} Strictly speaking, C.JALR does not expand exactly to a base RVI -- cgit v1.1