aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Stuebner <[email protected]>2022-12-23 23:13:21 +0100
committerPalmer Dabbelt <[email protected]>2022-12-29 06:59:41 -0800
commita3775634f6da23f5511d0282d7e792cf606e5f3b (patch)
treef39dd5726d8b80a4292e5d21aa0dcb4265a04bda
parent51094a24b85e29138b7fa82ef1e1b4fe19c90046 (diff)
RISC-V: fix funct4 definition for c.jalr in parse_asm.h
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. Fixes: edde5584c7ab ("riscv: Add SW single-step support for KDB") Reported-by: Andrew Jones <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Reviewed-by: Lad Prabhakar <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
-rw-r--r--arch/riscv/include/asm/parse_asm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/parse_asm.h b/arch/riscv/include/asm/parse_asm.h
index f36368de839f..7fee806805c1 100644
--- a/arch/riscv/include/asm/parse_asm.h
+++ b/arch/riscv/include/asm/parse_asm.h
@@ -125,7 +125,7 @@
#define FUNCT3_C_J 0xa000
#define FUNCT3_C_JAL 0x2000
#define FUNCT4_C_JR 0x8000
-#define FUNCT4_C_JALR 0xf000
+#define FUNCT4_C_JALR 0x9000
#define FUNCT12_SRET 0x10200000