diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-01-13 14:21:15 -0800 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2023-01-13 14:55:47 -0800 |
commit | 830324dcd2fc75adc621939eed5a6639c62075bf (patch) | |
tree | 3846353050bae80fcfaebfbec27dd6e39202bd98 /riscv/isa_parser.h | |
parent | 23718cb9b1ef2447b765e0b8cafb2ad15b469135 (diff) | |
download | riscv-isa-sim-830324dcd2fc75adc621939eed5a6639c62075bf.zip riscv-isa-sim-830324dcd2fc75adc621939eed5a6639c62075bf.tar.gz riscv-isa-sim-830324dcd2fc75adc621939eed5a6639c62075bf.tar.bz2 |
Lift artificial limit of 191 extensions
Add new accessors that accept the isa_extension_t enum.
Retain the original ones that accept unsigned char to avoid churn.
Diffstat (limited to 'riscv/isa_parser.h')
-rw-r--r-- | riscv/isa_parser.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/riscv/isa_parser.h b/riscv/isa_parser.h index 1426e42..69df34a 100644 --- a/riscv/isa_parser.h +++ b/riscv/isa_parser.h @@ -62,6 +62,7 @@ typedef enum { EXT_XZBR, EXT_XZBT, EXT_SSTC, + NUM_ISA_EXTENSIONS } isa_extension_t; typedef enum { @@ -83,6 +84,9 @@ public: reg_t get_max_isa() const { return max_isa; } std::string get_isa_string() const { return isa_string; } bool extension_enabled(unsigned char ext) const { + return extension_enabled(isa_extension_t(ext)); + } + bool extension_enabled(isa_extension_t ext) const { if (ext >= 'A' && ext <= 'Z') return (max_isa >> (ext - 'A')) & 1; else |