[PATCH v4 01/12] RISC-V: fix funct4 definition for c.jalr in parse_asm.h

Lad, Prabhakar prabhakar.csengg at gmail.com
Sat Dec 10 04:34:55 PST 2022


Hi Heiko,

Thank you for the patch.

On Wed, Dec 7, 2022 at 6:08 PM Heiko Stuebner <heiko at sntech.de> wrote:
>
> From: Heiko Stuebner <heiko.stuebner at vrull.eu>
>
> The opcode definition for c.jalr is
>     c.jalr c_rs1_n0  1..0=2 15..13=4 12=1 6..2=0
>
> This means funct4 consisting of bit [15:12] is 1001b, so the value is 0x9.
>
I was struggling to find the details for this, finally found it here
https://msyksphinz-self.github.io/riscv-isadoc/html/rvc.html#c-jalr

> Fixes: edde5584c7ab ("riscv: Add SW single-step support for KDB")
> Reported-by: Andrew Jones <ajones at ventanamicro.com>
> Reviewed-by: Andrew Jones <ajones at ventanamicro.com>
> Signed-off-by: Heiko Stuebner <heiko.stuebner at vrull.eu>
> ---
>  arch/riscv/include/asm/parse_asm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj at bp.renesas.com>

Cheers,
Prabhakar



More information about the linux-riscv mailing list