[all-commits] [llvm/llvm-project] a92bcb: [SPARC][IAS] Reject unknown/unavailable mnemonics ...

Koakuma via All-commits all-commits at lists.llvm.org
Wed Jul 10 21:33:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a92bcb20b8cfeb74852ccade1651cdf4d1f296de
      https://github.com/llvm/llvm-project/commit/a92bcb20b8cfeb74852ccade1651cdf4d1f296de
  Author: Koakuma <koachan at protonmail.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
    M llvm/test/MC/Sparc/sparc-asm-errors.s
    M llvm/test/MC/Sparc/sparc-cas-instructions.s
    M llvm/test/MC/Sparc/sparcv9-instructions.s

  Log Message:
  -----------
  [SPARC][IAS] Reject unknown/unavailable mnemonics early in ParseInstruction

Validate and reject any unknown or unavailable instruction mnemonics early
in ParseInstruction, before any operand parsing is performed. Some operands
(mainly memory ones) can be parsed slightly differently in V8 and V9
assembly language, so by rejecting unknown or unavailable instructions early
we can prevent the error message from being shadowed by the one raised during
operand parsing.

As a side effect this also allows us to tell unknown and unavailable
mnemonics apart, and issue a suggestion in appropriate cases.

This is based on the approach taken by the MIPS backend.

Reviewers: brad0, rorth, s-barannikov, jrtc27

Reviewed By: s-barannikov

Pull Request: https://github.com/llvm/llvm-project/pull/96021



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list