[all-commits] [llvm/llvm-project] bd7585: [RISCV] Improve error for using x18-x27 in a regis...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Apr 1 11:14:46 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd7585bea3906aa2d288f7238382e99b8d5506eb
      https://github.com/llvm/llvm-project/commit/bd7585bea3906aa2d288f7238382e99b8d5506eb
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-04-01 (Tue, 01 Apr 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
    M llvm/test/MC/RISCV/rv32e-xqccmp-invalid.s
    M llvm/test/MC/RISCV/rv32e-zcmp-invalid.s
    M llvm/test/MC/RISCV/rv64e-xqccmp-invalid.s
    M llvm/test/MC/RISCV/rv64e-zcmp-invalid.s

  Log Message:
  -----------
  [RISCV] Improve error for using x18-x27 in a register list with RVE. (#133936)

matchRegisterNameHelper returns MCRegister() for RVE so the first RVE
check was dead.

For the second check, I've moved the RVE check from the comma parsing to
the identifier parsing so the diagnostic points at the register. Note
we're using matchRegisterName instead of matchRegisterNameHelper to
avoid allowing ABI names so we don't get the RVE check that lives inside
matchRegisterNameHelper.

The errors for RVE in general should probably say something other than
"invalid register", but that's a problem throughout the assembler.



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