qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 15/19] hw/mips/bootloader: Propagate CPU env to bl_gen_jalr()


From: Philippe Mathieu-Daudé
Subject: [PATCH v2 15/19] hw/mips/bootloader: Propagate CPU env to bl_gen_jalr()
Date: Mon, 13 Jan 2025 20:55:21 +0100

Propagate the target specific CPU env to the locally
declared bl_gen_jalr() function.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/mips/bootloader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c
index 288dccce473..a0fc840e89f 100644
--- a/hw/mips/bootloader.c
+++ b/hw/mips/bootloader.c
@@ -127,7 +127,7 @@ static void bl_gen_dsll(void **p, bl_reg rd, bl_reg rt, 
uint8_t sa)
     }
 }
 
-static void bl_gen_jalr(void **p, bl_reg rs)
+static void bl_gen_jalr(const CPUMIPSState *env, void **p, bl_reg rs)
 {
     if (bootcpu_supports_isa(ISA_NANOMIPS32)) {
         uint32_t insn = 0;
@@ -253,7 +253,7 @@ void bl_gen_jump_to(const MIPSCPU *cpu, void **p, 
target_ulong jump_addr)
     const CPUMIPSState *env = &cpu->env;
 
     bl_gen_load_ulong(env, p, BL_REG_T9, jump_addr);
-    bl_gen_jalr(p, BL_REG_T9);
+    bl_gen_jalr(env, p, BL_REG_T9);
     bl_gen_nop(p); /* delay slot */
 }
 
-- 
2.47.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]