From d10de168ee002a7adcff75ab6f29cf508b992d3f Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Mon, 21 Nov 2016 20:38:24 -0500 Subject: [PATCH] Fixes #30 - The --machine command line option does not work --- ewm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ewm.c b/ewm.c index b06e984..e58a655 100644 --- a/ewm.c +++ b/ewm.c @@ -97,7 +97,7 @@ static struct ewm_machine_t *machine_with_name(char *name) { } int main(int argc, char **argv) { - struct ewm_machine_t *machine = NULL; + struct ewm_machine_t *machine = &machines[0]; bool strict = false; char *trace_path = NULL; @@ -129,7 +129,7 @@ int main(int argc, char **argv) { cpu_strict(&cpu, strict); cpu_trace(&cpu, trace_path); - (void) setup_replica1(&cpu); + machine->setup(&cpu); switch (cpu_boot(&cpu)) { case EWM_CPU_ERR_UNIMPLEMENTED_INSTRUCTION: