diff options
author | Chih-Min Chao <48193236+chihminchao@users.noreply.github.com> | 2020-04-03 13:51:10 +0800 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-04-05 22:40:25 -0700 |
commit | 5fd0cf08eb3470deeccef9f43e4819fffb252aa5 (patch) | |
tree | 9c7ca3854401395bfaaea346dcf72324ec7807c1 | |
parent | b019decca797f7726037ffa025b46a69e33a3ad9 (diff) | |
download | spike-5fd0cf08eb3470deeccef9f43e4819fffb252aa5.zip spike-5fd0cf08eb3470deeccef9f43e4819fffb252aa5.tar.gz spike-5fd0cf08eb3470deeccef9f43e4819fffb252aa5.tar.bz2 |
option: flag x extension without loading shared lib (#439)
reserve the word 'dummy' to set the x-extension in misa but not to load
a related shared library.
ex:
--isa=IMACXdummy
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
-rw-r--r-- | riscv/processor.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc index da27405..d4c6be9 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -238,7 +238,11 @@ void processor_t::parse_isa_string(const char* str) const char* ext = p+1, *end = ext; while (islower(*end)) end++; - register_extension(find_extension(std::string(ext, end - ext).c_str())()); + + auto ext_str = std::string(ext, end - ext); + if (ext_str != "dummy") + register_extension(find_extension(ext_str.c_str())()); + p = end; } else { bad_isa_string(str); |