[lld] [llvm] [RISCV] Fix alignment when mixing rvc/norvc relax/norelax code (PR #150159)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 23 14:47:00 PDT 2025
================
@@ -3177,6 +3177,18 @@ bool RISCVAsmParser::parseDirectiveOption() {
if (Parser.parseEOL())
return true;
+ auto &Streamer = getTargetStreamer().getStreamer();
+ auto *Assembler = Streamer.getAssemblerPtr();
+ auto *Section = Streamer.getCurrentSectionOnly();
+ // Update RVCEver status only if any instruction emitted.
+ if (Section->hasInstructions() && Assembler != nullptr &&
+ (getSTI().hasFeature(RISCV::FeatureStdExtC) ||
----------------
topperc wrote:
C implies Zca
https://github.com/llvm/llvm-project/pull/150159
More information about the llvm-commits
mailing list