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

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


  Branch: refs/heads/users/arichardson/llvm-objdump-risc-v-do-not-leak-file-level-features-into-x
  Home:   https://github.com/llvm/llvm-project
  Commit: 5978944657dffb5d6f7da91e81858effc68fc602
      https://github.com/llvm/llvm-project/commit/5978944657dffb5d6f7da91e81858effc68fc602
  Author: Alex 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

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



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