[all-commits] [llvm/llvm-project] 2484d4: [RISC-V] Update streamer ArchString in emitTargetF...
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Wed Sep 23 23:20:41 PDT 2026
Branch: refs/heads/users/arichardson/risc-v-update-streamer-archstring-in-emittargetfeaturepush
Home: https://github.com/llvm/llvm-project
Commit: 2484d412a7f899deb8c555471a3c05172d4b39cd
https://github.com/llvm/llvm-project/commit/2484d412a7f899deb8c555471a3c05172d4b39cd
Author: Alex Richardson <alexrichardson at google.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
M llvm/test/CodeGen/RISCV/module-asm-features.ll
M llvm/test/CodeGen/RISCV/riscv-func-target-feature.ll
Log Message:
-----------
[RISC-V] Update streamer ArchString in emitTargetFeaturePush()
Previously, RISCVAsmPrinter::emitTargetFeaturePush() only emitted `.option push`
and `.option arch` without updating the streamer's active ArchString. When
emitting an ELF object file directly (`-filetype=obj`),
RISCVTargetELFStreamer::emitDirectiveOptionArch() is a no-op while
emitTargetFeaturePop() resets ArchString back to the pushed ArchString, so
module-level inline assembly and functions with custom `target-features` failed
to emit updated `$x<arch>` mapping symbols.
Call RTS.setArchString() with the parsed ISA string in emitTargetFeaturePush()
so `-filetype=obj` records the active `$x<arch>` mapping symbol alongside
`.option arch`.
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