diff options
author | Freya Murphy <freya@freyacat.org> | 2024-10-01 18:20:50 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-10-01 18:20:50 -0400 |
commit | 12e098b6823b7d688434bc69729216b2268b1852 (patch) | |
tree | 51385c1183ecb4caed550dfeea514512c4589aed /msim/main.c | |
parent | dont require phdr to link (diff) | |
download | mips-12e098b6823b7d688434bc69729216b2268b1852.tar.gz mips-12e098b6823b7d688434bc69729216b2268b1852.tar.bz2 mips-12e098b6823b7d688434bc69729216b2268b1852.zip |
fix sign extension, support branch delay slot
Diffstat (limited to 'msim/main.c')
-rw-r--r-- | msim/main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/msim/main.c b/msim/main.c index f8a0999..13f6383 100644 --- a/msim/main.c +++ b/msim/main.c @@ -2,7 +2,6 @@ #include <stdio.h> #include <unistd.h> #include <merror.h> -#include <signal.h> #include "fault.h" #include "sim.h" @@ -11,7 +10,7 @@ static void help(void) { printf("usage: msim [options] executable\n\n"); printf("options:\n"); printf("\t-h\t\tprints this help messaage\n"); - printf("\t-c\t\tdisable runtime memory checks (allows segfault)\n"); + printf("\t-j\t\tdisable jump delay slot\n"); printf("\t-d\t\truns the debugger\n"); } @@ -21,18 +20,18 @@ int main(int argc, char **argv) { struct simulator_args args = { .executable = NULL, .debug = false, - .memchk = true, + .jdelay = true, }; int c; - while ((c = getopt(argc, argv, "hcd")) != 1) { + while ((c = getopt(argc, argv, "hjd")) != 1) { switch (c) { case 'h': help(); return M_SUCCESS; - case 'c': - args.memchk = false; + case 'j': + args.jdelay = false; break; case 'd': args.debug = true; |