aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_insts_mext.sail
AgeCommit message (Collapse)AuthorFilesLines
2024-05-20Fix mext whitespaceJordan Carlin1-53/+53
2024-05-18Move haveMulDiv() guard to encdec for M extensionJordan Carlin1-42/+12
2024-05-12Refactor MUL instructionAlasdair1-20/+19
This instruction had a bit of a case of 'boolean blindness' code smell, where the mul operation was represented as a triple of booleans. This commit refactors the implemention to use a struct with named fields for high, signed_rs1, and signed_rs2. The C_MUL instruction in Zcb also needs to be changed appropriately The mul_op struct was added in riscv_types While there do some housekeeping w.r.t the comment about a workaround for Sail < 0.15.1, as this is no longer needed.
2024-02-08Shorten copyright notice at the top of each fileTim Hutt1-65/+3
This script was used to do the modification: ``` from pathlib import Path import re RE_LINE = r"/\*={50,150}\*/\n" RE_MIDDLE = r"/\*.*\*/\n" NEW_TEXT = """/*=======================================================================================*/ /* This Sail RISC-V architecture model, comprising all files and */ /* directories except where otherwise noted is subject the BSD */ /* two-clause license in the LICENSE file. */ /* */ /* SPDX-License-Identifier: BSD-2-Clause */ /*=======================================================================================*/ """ REPLACEMENT = re.compile(rf"^{RE_LINE}(?:{RE_MIDDLE}){{10,100}}{RE_LINE}") def main(): for file in Path("model").glob("**/*.sail"): text = file.read_text(encoding="utf-8") text = REPLACEMENT.sub(NEW_TEXT, text, 1) file.write_text(text, encoding="utf-8") if __name__ == "__main__": main() ```
2023-08-01Rename EXTZ and EXTSAlasdair1-3/+3
Rename EXTZ to zero_extend and EXTS to sign_extend. Two main reasons for doing this - it means that the source more closely follows the descriptions in the documentation with more readable names, and EXTS and EXTZ are visually very close to each other with just the S and Z. They are also following an odd convention where they are ALLCAPS rather than snake_case like other functions in the spec. I think this convention comes from early Power specs in Sail, which influenced Sail MIPS and CHERI-MIPS, but I don't think it's a very good convention we should be keeping in sail-riscv
2023-05-29apply_headers: regenerate copyright headersupdate-copyright-headersPhilipp Tomsich1-1/+3
2022-01-19Add support for Zmmul (#122)Bilal Sakhawat1-2/+2
2021-07-29Use headache to apply copyright header at request of Peter Sewell.Robert Norton1-0/+68
2019-05-10Rename regbits to regidx, to clarify the type is an index and not the ↵Prashanth Mundkur1-6/+6
contents of a register.
2019-05-10Use an explicit enum to indicate the retire status as opposed to a boolean ↵Prashanth Mundkur1-12/+12
to improve clarity.
2019-05-03Minor formatting cleanup and remove obsolete comments.Prashanth Mundkur1-1/+1
2019-02-19Use sizeof xlen instead of the value definitions of xlen.Prashanth Mundkur1-17/+17
2019-02-11Fix xlen variable name.Prashanth Mundkur1-17/+17
2019-02-08Add xlen guards on encdec and assembly guards, and encdec for c.jal.Prashanth Mundkur1-1/+14
2019-02-08Start parameterizing definitions by xlen, which is currently still 64.Prashanth Mundkur1-4/+6
2019-01-25Add misa checks for instructions not in the base set.Prashanth Mundkur1-49/+81
2019-01-25Factor out each extension into separate files, do some minor cleanup.Prashanth Mundkur1-0/+143