[llvm] [SPARC][IAS] Add v8plus feature bit (PR #101367)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 05:19:27 PDT 2024


================
@@ -38,8 +51,16 @@ void SparcTargetAsmStreamer::emitSparcRegisterScratch(unsigned reg) {
      << ", #scratch\n";
 }
 
-SparcTargetELFStreamer::SparcTargetELFStreamer(MCStreamer &S)
-    : SparcTargetStreamer(S) {}
+SparcTargetELFStreamer::SparcTargetELFStreamer(MCStreamer &S,
+                                               const MCSubtargetInfo &STI)
+    : SparcTargetStreamer(S) {
+  MCAssembler &MCA = getStreamer().getAssembler();
+  unsigned EFlags = MCA.getELFHeaderEFlags();
+
+  EFlags |= getEFlagsForFeatureSet(STI);
+
+  MCA.setELFHeaderEFlags(EFlags);
----------------
s-barannikov wrote:

This interface has been recently moved to ELFObjectWriter, the PR needs rebasing.


https://github.com/llvm/llvm-project/pull/101367


More information about the llvm-commits mailing list