aboutsummaryrefslogtreecommitdiff
path: root/riscv
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2021-09-18 19:02:44 -0700
committerAndrew Waterman <andrew@sifive.com>2021-09-18 19:03:48 -0700
commitb29f4c21498a81df8ea3b558d686b29da5616393 (patch)
tree264783298603c764a8e5755e7665c0417e6bdba4 /riscv
parent2a5181d913d9ea93e931752f2acf78689c8e0046 (diff)
downloadspike-b29f4c21498a81df8ea3b558d686b29da5616393.zip
spike-b29f4c21498a81df8ea3b558d686b29da5616393.tar.gz
spike-b29f4c21498a81df8ea3b558d686b29da5616393.tar.bz2
Fix handling of xdummy
@marcfedorow the logic wasn't quite right; xdummy was causing the "single 'X' is not a proper name" message to be printed.
Diffstat (limited to 'riscv')
-rw-r--r--riscv/processor.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc
index 5ab3c27..4e44779 100644
--- a/riscv/processor.cc
+++ b/riscv/processor.cc
@@ -309,10 +309,10 @@ void processor_t::parse_isa_string(const char* str)
extension_table[toupper('x')] = true;
if (ext_str == "xbitmanip") {
extension_table[EXT_XBITMANIP] = true;
- } else if (ext_str[1] && ext_str != "xdummy") {
- register_extension(find_extension(ext_str.substr(1).c_str())());
- } else {
+ } else if (ext_str.size() == 1) {
bad_isa_string(str, "single 'X' is not a proper name");
+ } else if (ext_str != "xdummy") {
+ register_extension(find_extension(ext_str.substr(1).c_str())());
}
} else {
bad_isa_string(str, ("unsupported extension: " + ext_str).c_str());