On 3/12/25 20:45, Richard Henderson wrote:
Semihosting is not enabled for user-only.
Avoid the test for that case.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  target/mips/cpu.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index b207106dd7..1ca182c1a2 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -415,11 +415,12 @@ static void mips_cpu_reset_hold(Object *obj, ResetType 
type)
      restore_pamask(env);
      cs->exception_index = EXCP_NONE;
+#ifdef CONFIG_SEMIHOSTING
      if (semihosting_get_argc()) {
          /* UHI interface can be used to obtain argc and argv */
          env->active_tc.gpr[4] = -1;
      }
-
+#endif
  #ifndef CONFIG_USER_ONLY
      if (kvm_enabled()) {
          kvm_mips_reset_vcpu(cpu);

Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>


Reply via email to