Skip to content

Commit

Permalink
isa parser: reject Xbitmanip extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
aswaterman committed Jun 18, 2023
1 parent 961d6de commit 69389df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
27 changes: 1 addition & 26 deletions riscv/isa_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,32 +242,7 @@ isa_parser_t::isa_parser_t(const char* str, const char *priv)
extension_table[EXT_SSTC] = true;
} else if (ext_str[0] == 'x') {
extension_table['X'] = true;
if (ext_str == "xbitmanip") {
extension_table[EXT_XZBP] = true;
extension_table[EXT_XZBS] = true;
extension_table[EXT_XZBE] = true;
extension_table[EXT_XZBF] = true;
extension_table[EXT_XZBC] = true;
extension_table[EXT_XZBM] = true;
extension_table[EXT_XZBR] = true;
extension_table[EXT_XZBT] = true;
} else if (ext_str == "xzbp") {
extension_table[EXT_XZBP] = true;
} else if (ext_str == "xzbs") {
extension_table[EXT_XZBS] = true;
} else if (ext_str == "xzbe") {
extension_table[EXT_XZBE] = true;
} else if (ext_str == "xzbf") {
extension_table[EXT_XZBF] = true;
} else if (ext_str == "xzbc") {
extension_table[EXT_XZBC] = true;
} else if (ext_str == "xzbm") {
extension_table[EXT_XZBM] = true;
} else if (ext_str == "xzbr") {
extension_table[EXT_XZBR] = true;
} else if (ext_str == "xzbt") {
extension_table[EXT_XZBT] = true;
} else if (ext_str.size() == 1) {
if (ext_str.size() == 1) {
bad_isa_string(str, "single 'X' is not a proper name");
} else if (ext_str != "xdummy") {
extension_t* x = find_extension(ext_str.substr(1).c_str())();
Expand Down
8 changes: 0 additions & 8 deletions riscv/isa_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ typedef enum {
EXT_ZIHPM,
EXT_ZVFBFMIN,
EXT_ZVFBFWMA,
EXT_XZBP,
EXT_XZBS,
EXT_XZBE,
EXT_XZBF,
EXT_XZBC,
EXT_XZBM,
EXT_XZBR,
EXT_XZBT,
EXT_SSTC,
EXT_INTERNAL_ZFH_MOVE,
NUM_ISA_EXTENSIONS
Expand Down

0 comments on commit 69389df

Please sign in to comment.