[all-commits] [llvm/llvm-project] 2297db: [RISC-V] Update streamer ArchString in emitTargetF...
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Mon Sep 21 10:03:55 PDT 2026
Branch: refs/heads/users/arichardson/risc-v-update-streamer-archstring-in-emittargetfeaturepush
Home: https://github.com/llvm/llvm-project
Commit: 2297dbd41469e7bd6c093cd5f187f31cccf3d5b6
https://github.com/llvm/llvm-project/commit/2297dbd41469e7bd6c093cd5f187f31cccf3d5b6
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
Commit: b006244c87ca47ed42d23d6e22b218ca6096d006
https://github.com/llvm/llvm-project/commit/b006244c87ca47ed42d23d6e22b218ca6096d006
Author: Alex Richardson <alexrichardson at google.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
Log Message:
-----------
clang-format
Compare: https://github.com/llvm/llvm-project/compare/e86024361e11...b006244c87ca
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