[llvm-branch-commits] [llvm] [SPARC][IAS] Reject unknown/unavailable mnemonics early in ParseInstruction (PR #96021)
Sergei Barannikov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 10 12:02:01 PDT 2024
https://github.com/s-barannikov approved this pull request.
The downside of this approach is that you lose the ability to report the missing features (unless you implement it yourself, which would be a code duplication), that would allow to produce instead better diagnostics like "instruction requires: LeonCASA".
Also, sometimes a mnemonic is valid in both modes, but certain operand combinations are only allowed in V9, e.g. swapa with r+i addressing mode. In this case you still rely on MatchOperandParserImpl & MatchInstructionImpl, which can produce different / broken diagnostics.
I'd still vote for ParseForAllFeatures, but I don't insist since people are unlikely to see these diagnostics anyway.
https://github.com/llvm/llvm-project/pull/96021
More information about the llvm-branch-commits
mailing list