diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/sh/.Sanitize | 1 | ||||
-rw-r--r-- | sim/sh/run.c | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/sim/sh/.Sanitize b/sim/sh/.Sanitize index a4d6ae6..f14e72e 100644 --- a/sim/sh/.Sanitize +++ b/sim/sh/.Sanitize @@ -31,6 +31,7 @@ configure.in interp.c gencode.c run.c +sh.mt Things-to-lose: diff --git a/sim/sh/run.c b/sim/sh/run.c index ea443d6..337218d 100644 --- a/sim/sh/run.c +++ b/sim/sh/run.c @@ -36,6 +36,8 @@ main (ac, av) int verbose = 0; int trace = 0; char *name = ""; + sim_set_timeout(10000000); + for (i = 1; i < ac; i++) { if (strcmp (av[i], "-v") == 0) @@ -57,6 +59,11 @@ main (ac, av) sim_set_profile_size(atoi(av[i+1])); i++; } + else if (strcmp (av[i], "-k") == 0) + { + sim_set_timeout(atoi(av[i+1])); + i++; + } else if (strcmp (av[i], "-m") == 0) { sim_size(atoi(av[i+1])); @@ -106,7 +113,13 @@ main (ac, av) if (verbose) sim_info (); - return 0; + /* Find out what was in r0 and return that */ + { + unsigned char b[4]; + sim_fetch_register(0, b); + return b[3]; + } + } } |