From 8ad998f0e76014bdc0ed54affa421fe17be70afa Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 17 Dec 2024 23:05:09 -0800 Subject: [PATCH] Add --strict command-line arg to spike-dasm --- spike_dasm/spike-dasm.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spike_dasm/spike-dasm.cc b/spike_dasm/spike-dasm.cc index 547f044508..a0932977a7 100644 --- a/spike_dasm/spike-dasm.cc +++ b/spike_dasm/spike-dasm.cc @@ -19,6 +19,7 @@ int main(int UNUSED argc, char** argv) { string s; const char* isa = DEFAULT_ISA; + bool strict = false; std::function extension; option_parser_t parser; @@ -26,10 +27,11 @@ int main(int UNUSED argc, char** argv) parser.option(0, "extension", 1, [&](const char* s){extension = find_extension(s);}); #endif parser.option(0, "isa", 1, [&](const char* s){isa = s;}); + parser.option(0, "strict", 0, [&](const char UNUSED *s){strict = true;}); parser.parse(argv); isa_parser_t isa_parser(isa, DEFAULT_PRIV); - disassembler_t* disassembler = new disassembler_t(&isa_parser); + disassembler_t* disassembler = new disassembler_t(&isa_parser, strict); if (extension) { for (auto disasm_insn : extension()->get_disasms()) { disassembler->add_insn(disasm_insn);