Description
In PR #577, the check for the Zclsd extension currently resides within the operation() function. However, this design hides the constraint from downstream tools like disassemblers that do not evaluate operation() to determine instruction validity.
As suggested in the discussion, it would be better to lift this constraint to the instruction definition level for better visibility and consistency. Unfortunately, the current schema does not support this kind of conditional inclusion, since definedBy is limited to simple extension-based checks.
Proposal:
Consider extending the schema to support conditional availability of instructions, potentially using a structure like:
definedBy:
anyOf:
- { name: C, when: xlen() > 32 }
- { name: Zca, when: xlen() > 32 }
- { name: Zclsd, when: xlen() == 32 }
Alternatively, introduce a new availableIf field or similar mechanism to handle such cases.