[PATCH/committed] sim: mn10300: fix sim_engine_halt call

Message ID 20231205125836.4297-1-vapier@gentoo.org
State New
Headers
Series [PATCH/committed] sim: mn10300: fix sim_engine_halt call |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Mike Frysinger Dec. 5, 2023, 12:58 p.m. UTC
  The sim_stop argument is an enum and should only be one of those
values, not a signal constant.  Fix the logic to pass the right
sim_xxx & SIM_xxx values in the right arguments.
---
 sim/mn10300/op_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c
index 5425537dc1de..5cb4158efd9e 100644
--- a/sim/mn10300/op_utils.c
+++ b/sim/mn10300/op_utils.c
@@ -155,7 +155,8 @@  do_syscall (SIM_DESC sd)
     {
       /* EXIT - caller can look in parm1 to work out the reason */
       sim_engine_halt (simulator, STATE_CPU (simulator, 0), NULL, PC,
-		       (parm1 == 0xdead ? SIM_SIGABRT : sim_exited), parm1);
+		       parm1 == 0xdead ? sim_stopped : sim_exited,
+		       parm1 == 0xdead ? SIM_SIGABRT : parm1);
     }
   else
     {