Skip to content

Conversation

willieyz
Copy link
Collaborator

@willieyz willieyz commented Aug 21, 2025

  • Resolves: AArch64: Don't force numbering of <dt> annotations in instruction pattern #219

  • Add support for using repeated .<dt> in instruction patterns, while keeping backward compatibility.

  • This PR solve problem by:

    • Introducing a new static method _replace_duplicate_mnemonicKey() in AArch64Instruction to handle duplicate <dt> specifiers during parsing and writing.
    • Enforcing that all .<dt*> are equal during parsing.
      • Here is an example:
        • For pattern: smlsl <Vd>.<dt0>, <Va>.<dt1>, <Vb>.<dt1>
        • When parsing:
          • smlsl v6.4s, v7.4h, v8.4h -> Passed,
          • smlsl v6.4s, v7.4h, v8.4s -> Failed,
            return return "Inconsistent dataname: <dt0> vs <dt1> for datatype: 4s"
          • smlsl v6.4s, v7.4h, v8.16b -> Failed,
            return "Inconsistent datatype: 4h vs 16b for dataname: <dt1>"

@willieyz willieyz marked this pull request as ready for review August 21, 2025 10:18
@willieyz willieyz requested a review from mkannwischer August 22, 2025 06:46
@willieyz willieyz force-pushed the fix-support-duplicate-dt branch from fd6b07b to 501a3bf Compare September 16, 2025 07:40
@willieyz willieyz force-pushed the fix-support-duplicate-dt branch 6 times, most recently from ae437c5 to 8b4c591 Compare September 19, 2025 10:22
@willieyz willieyz force-pushed the fix-support-duplicate-dt branch 5 times, most recently from 36c007c to 6840fa5 Compare September 23, 2025 12:07
@willieyz willieyz marked this pull request as draft September 24, 2025 02:26
@willieyz willieyz force-pushed the fix-support-duplicate-dt branch 4 times, most recently from 28acf19 to 2b2ba39 Compare September 25, 2025 02:58
@willieyz willieyz marked this pull request as ready for review September 25, 2025 03:46
@willieyz willieyz force-pushed the fix-support-duplicate-dt branch from 2b2ba39 to 482ba33 Compare September 25, 2025 11:04
Copy link
Collaborator

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @willieyz!

- Add support for using repeated `.<dt*>` in instruction patterns, while keeping backward compatibility.

- Introduce a new static method `_replace_duplicate_mnemonicKey()` in AArch64Instruction to handle duplicate specifiers during parsing and writing.

Signed-off-by: willieyz <willie.zhao@chelpis.com>
…ring parsing.

- This commit enforcing that all `.<dt*>` are equal during parsing.

- Here is an example:

- For pattern: `smlsl <Vd>.<dt0>, <Va>.<dt1>, <Vb>.<dt1>`

- When parsing:
  - `smlsl v6.4s, v7.4h, v8.4h` -> Passed,
  - `smlsl v6.4s, v7.4h, v8.4s` -> Failed,
     return `"Inconsistent data type: 4h vs 4s"`
  - `smlsl v6.4h, v7.4h, v8.4h` -> Failed,
     return `"Inconsistent dt: <dt1>"`

Signed-off-by: willieyz <willie.zhao@chelpis.com>
Signed-off-by: willieyz <willie.zhao@chelpis.com>
@mkannwischer mkannwischer force-pushed the fix-support-duplicate-dt branch from 482ba33 to 98c9d0c Compare October 2, 2025 06:16
@mkannwischer mkannwischer merged commit c674e4a into main Oct 2, 2025
38 checks passed
@mkannwischer mkannwischer deleted the fix-support-duplicate-dt branch October 2, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AArch64: Don't force numbering of <dt> annotations in instruction pattern
2 participants