Skip to content

Improve Zclsd Constraint Visibility Outside of operation() Function #827

Open
@Shehrozkashif

Description

@Shehrozkashif

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    data errorAn error in the database data

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions