[all-commits] [llvm/llvm-project] e6e5ad: [llvm-objdump][RISC-V] Do not leak file-level feat...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Tue Sep 29 22:10:24 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e6e5ade05a9b645beb37ce1dd5142f6a923b1eae
      https://github.com/llvm/llvm-project/commit/e6e5ade05a9b645beb37ce1dd5142f6a923b1eae
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M llvm/test/tools/llvm-objdump/ELF/RISCV/mapping-sym-isa-disassembly.s
    M llvm/test/tools/llvm-objdump/ELF/RISCV/mapping-sym-isa-mattr-conflict.s
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump][RISC-V] Do not leak file-level features into $x<ISA> regions (#227513)

Previously, RISCVISATargetCache::get initialized per-region features from
Base.SubtargetInfo->getFeatureString(), which already included the
file-level Tag_RISCV_arch and --mattr flags. Because RISCVISAInfo::toFeatures()
only emits "+ext" for extensions present in the "$x<ISA>" mapping symbol
(and never "-ext"), any extension enabled in Tag_RISCV_arch or via a
conflicting --mattr remained enabled even in regions whose "$x<ISA>"
mapping symbol disabled it.

Start from an empty SubtargetFeatures instead and populate it from the
parsed "$x<ISA>" mapping symbol (plus non-conflicting --mattr flags).

This commit was created with the help of AI tools

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



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