From 12e098b6823b7d688434bc69729216b2268b1852 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 1 Oct 2024 18:20:50 -0400 Subject: fix sign extension, support branch delay slot --- msim/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'msim/main.c') 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 #include #include -#include #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; -- cgit v1.2.3-freya