From: Yunsup Lee Date: Thu, 12 Mar 2015 17:59:09 +0000 (-0700) Subject: correctly parse extension for spike-disasm X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9af855a28e7dc4009ad31312840ca6f9396d572e;p=riscv-isa-sim.git correctly parse extension for spike-disasm --- diff --git a/spike_main/spike-dasm.cc b/spike_main/spike-dasm.cc index 7f15db0..aecaa0a 100644 --- a/spike_main/spike-dasm.cc +++ b/spike_main/spike-dasm.cc @@ -22,6 +22,12 @@ int main(int argc, char** argv) std::function extension; option_parser_t parser; parser.option(0, "extension", 1, [&](const char* s){extension = find_extension(s);}); + parser.parse(argv); + + if (extension) { + for (auto disasm_insn : extension()->get_disasms()) + d.add_insn(disasm_insn); + } while (getline(cin, s)) {