aboutsummaryrefslogtreecommitdiff
path: root/riscv/isa_parser.h
AgeCommit message (Collapse)AuthorFilesLines
2023-04-14Add isa string support for Zfbfmin/Zvfbfmin/ZvfbfwmaWeiwei Li1-0/+3
2023-04-03Implement Zfa.Philipp Tomsich1-0/+1
This passes our developer test suite, when comparing output (signature) against the SAIL implementation. If any corner-cases require additional changes after ACT goes upstream, we can apply an add-on patch.
2023-03-20Implement Smrnmi extensionAndrew Waterman1-0/+1
We don't model any sources of RNMI, so this is mostly vestigial.
2023-02-06Add infrastructure to dynamically disable multi-letter extensionsWeiwei Li1-0/+3
Maintain a shadow structure of isa_parser_t::extension_table, processor_t::extension_enable_table, which tracks whether such extensions have been dynamically enabled or disabled. Sanity-check that `extension_enabled_const` honors its contract. The use of `mutable` is somewhat unfortunate, but we think it's acceptable here because the only thing that's mutating is this sanity-checking code, not visible to any consumer of this class.
2023-01-31Zicond: implement Zicond (conditional integer operations)Philipp Tomsich1-0/+1
This implements the Zicond (conditional integer operations) extension, as of version 1.0-draft-20230120. The Zicond extension acts as a building block for branchless sequences including conditional-arithmetic, conditional-logic and conditional-select/move. The following instructions constitute Zicond: - czero.eqz rd, rs1, rs2 => rd = (rs2 == 0) ? 0 : rs1 - czero.nez rd, rs1, rs2 => rd = (rs2 != 0) ? 0 : rs1 See https://github.com/riscv/riscv-zicond/releases/download/v1.0-draft-20230120/riscv-zicond_1.0-draft-20230120.pdf for the proposed specification and usage details.
2023-01-27Add Svadu Extension Parsing to ISA ParserAaron Durbin1-0/+1
Make the ISA parser understand the Svadu extension.
2023-01-13Simplify isa_parser_t::extension_enabledAndrew Waterman1-4/+1
Now that we guarantee that max_isa and extension_table are synchronized, we only need to check the latter.
2023-01-13Use more appropriate data structure for extension_tableAndrew Waterman1-2/+2
We know its size at compile time.
2023-01-13Lift artificial limit of 191 extensionsAndrew Waterman1-0/+4
Add new accessors that accept the isa_extension_t enum. Retain the original ones that accept unsigned char to avoid churn.
2022-12-20Support more than 65 Z* extensionsAndrew Waterman1-1/+1
The isa_extension_t enum already has 44 extensions. In not too long, the enum will grow in size to 65, when it will collide with the 'A' extension. Fix that preemptively by starting after 'Z'. This approach will run out of steam at 165 extensions because we are using `unsigned char` to represent extensions, but opefully we will have retired by that point. In seriousness, we will probably need to refactor the extension_enabled logic at some point in the future (e.g. when the configuration structure is finally added) and at that point we should lift the `char` limit.
2022-11-17add support for flags for Zc* extensionsWeiwei Li1-0/+6
2022-10-25Teach ISA parser about Zvfh[min]Andrew Waterman1-0/+2
2022-09-20Merge pull request #1036 from plctlab/plct-sscofpmf-devAndrew Waterman1-0/+1
add support for sscofpmf extension v0.5.2
2022-08-10Add space between if/while/switch and '('Weiwei Li1-1/+1
Add space between ')' and '{'
2022-08-09add support for sscofpmf extension v0.5.2Weiwei Li1-0/+1
since spike doesn't truly support counting of hardware performance events, only csr related read/write functions is supported currently
2022-08-03Add Sstc support. (#1057)i2h21-0/+1
2022-07-13add isa string parser for smepmpYenHaoChen1-0/+1
2022-07-07add isa string parser for smstateenWeiwei Li1-0/+1
2022-04-06mmu: support asid/vmid (#928)Chih-Min Chao1-0/+2
The change makes [v]satp.asid and hgatp.vmid writtable and supports maximum length for rv32 and rv64. Software could write and read the satp.asid to get the valid length or check if the core supports asid/vmid or not. However, there is no official way to describe this hardware capability (device tree or something else). Two implementation flags are also added for future use and enabled by default. Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2022-03-30Implement Sv57 and Sv57x4 translation modesAndrew Waterman1-0/+1
2022-03-29Split isa_parser_t out of processor.* and into its own file (#955)Rupert Swarbrick1-0/+87
The main motivation for this is that we want to move the ISA parsing logic to run before we even construct a simulator. That's probably a bit nicer if we don't depend on the processor header. It also means that we can stop depending on processor.h in disasm.cc or spike_log_parser.cc (both through disasm.h), which feels a bit cleaner: making sense of an instruction trace shouldn't really require knowledge of the internal state of a processor.