diff --git a/arch/csr/misa.yaml b/arch/csr/misa.yaml index 3a7edf9658..c5334b4ea8 100644 --- a/arch/csr/misa.yaml +++ b/arch/csr/misa.yaml @@ -169,6 +169,29 @@ fields: .. Execute every in-scope multiply extension instruction . check .. Check that every multiply extension instruction throws illegal instruction exception + Q: + location: 16 + description: | + Indicates support for the `Q` (quad precision float) extension. + + [when,"MUTABLE_MISA_Q == true"] + -- + Writing 0 to this field will cause all quad-precision floating point instructions to raise an `IllegalInstruction` exception. + -- + type(): | + return (implemented?(ExtensionName::Q) && MUTABLE_MISA_Q) ? CsrFieldType::RW : CsrFieldType::RO; + reset_value(): | + return implemented?(ExtensionName::Q) ? 1 : 0; + definedBy: Q + sw_write(csr_value): | + if (csr_value.Q == 0) { + return UNDEFINED_LEGAL_DETERMINISTIC; + } + + # fall-through; write the intended value + return csr_value.Q; + legal?(csr_value): | + return !(csr_value.Q == 0); S: location: 18 description: | diff --git a/arch/ext/Q.yaml b/arch/ext/Q.yaml index 0f57f57172..98b392f05d 100644 --- a/arch/ext/Q.yaml +++ b/arch/ext/Q.yaml @@ -18,3 +18,9 @@ versions: state: ratified ratification_date: null requires: D +params: + MUTABLE_MISA_Q: + description: | + Indicates whether or not the `Q` extension can be disabled with the `misa.Q` bit. + schema: + type: boolean