diff options
Diffstat (limited to 'sim/sh/run.c')
-rw-r--r-- | sim/sh/run.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sim/sh/run.c b/sim/sh/run.c index d85cee5..9a00852 100644 --- a/sim/sh/run.c +++ b/sim/sh/run.c @@ -113,10 +113,11 @@ main (ac, av) if (verbose) sim_info (0); - /* Find out what was in r0 and return that */ + /* Assume we left through the exit system call, + in which case r5 has the exit code */ { unsigned char b[4]; - sim_fetch_register (0, b); + sim_fetch_register (5, b); return b[3]; } |