When no arguments are passed, print spike help, not fesvr help
authorAndrew Waterman <andrew@sifive.com>
Sun, 29 Apr 2018 07:41:42 +0000 (00:41 -0700)
committerAndrew Waterman <andrew@sifive.com>
Sun, 29 Apr 2018 07:41:42 +0000 (00:41 -0700)
spike_main/spike.cc

index eb57baf5abfe7360ebcd4010dde0807eda8df032..e5aecabb1be2bbfcfe8c1d51ab1ea234b97b827c 100644 (file)
@@ -145,6 +145,9 @@ int main(int argc, char** argv)
   if (mems.empty())
     mems = make_mems("2048");
 
+  if (!*argv1)
+    help();
+
   sim_t s(isa, nprocs, halted, start_pc, mems, htif_args, std::move(hartids),
       progsize, max_bus_master_bits, require_authentication);
   std::unique_ptr<remote_bitbang_t> remote_bitbang((remote_bitbang_t *) NULL);
@@ -159,9 +162,6 @@ int main(int argc, char** argv)
     return 0;
   }
 
-  if (!*argv1)
-    help();
-
   if (ic && l2) ic->set_miss_handler(&*l2);
   if (dc && l2) dc->set_miss_handler(&*l2);
   for (size_t i = 0; i < nprocs; i++)