Skip to contentSkip to conversation

target/rx: set PSW.I when executing wait instruction

PATCH Applied Tomoaki Kawada 3 participants 4 messages Apr 17, 2022 – Apr 21, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/rx: set PSW.I when executing wait instruction

This patch fixes the implementation of the wait instruction to implicitly update PSW.I as required by the ISA specification.

---
 target/rx/op_helper.c | 1 +
 1 file changed, 1 insertion(+)
target/rx/op_helper.c +1 -0
index 11f952d340..81645adde3 100644
@@ -448,6 +448,7 @@ void QEMU_NORETURN helper_wait(CPURXState *env)
 
     cs->halted = 1;
     env->in_sleep = 1;
+    env->psw_i = 1;
     raise_exception(env, EXCP_HLT, 0);
 }
 
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Tomoaki Kawada

This patch fixes the implementation of the wait instruction to implicitly update PSW.I as required by the ISA specification.

---
  target/rx/op_helper.c | 1 +
  1 file changed, 1 insertion(+)
target/rx/op_helper.c +0 -0
index 11f952d340..81645adde3 100644

target/rx/op_helper.c void QEMU_NORETURN helper_wait(CPURXState *env) · line 454

Quoted 7 lines
target/rx/op_helper.c +1 -0
@@ -448,6 +448,7 @@ void QEMU_NORETURN helper_wait(CPURXState *env)
 
      cs->halted = 1;
      env->in_sleep = 1;
+    env->psw_i = 1;
      raise_exception(env, EXCP_HLT, 0);
  }
 

r~

Reviewed-by on v1 1/1
#2 lore raw
In reply to Tomoaki Kawada
Quoted 24 lines · Tomoaki Kawada

This patch fixes the implementation of the wait instruction to implicitly update PSW.I as required by the ISA specification.

---
 target/rx/op_helper.c | 1 +
 1 file changed, 1 insertion(+)
target/rx/op_helper.c +1 -0
index 11f952d340..81645adde3 100644
@@ -448,6 +448,7 @@ void QEMU_NORETURN helper_wait(CPURXState *env)
 
     cs->halted = 1;
     env->in_sleep = 1;
+    env->psw_i = 1;
     raise_exception(env, EXCP_HLT, 0);
 }
 
Signature · 1 line
2.35.1
Signature · 1 line
Yosinori Sato