From 9af855a28e7dc4009ad31312840ca6f9396d572e Mon Sep 17 00:00:00 2001 From: Yunsup Lee Date: Thu, 12 Mar 2015 10:59:09 -0700 Subject: [PATCH] correctly parse extension for spike-disasm --- spike_main/spike-dasm.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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)) { -- 2.30.2