[PATCH] D103313: [RISCV][Clang] Implement support for zmmul-experimental

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 28 09:58:40 PDT 2021


jrtc27 added a comment.

In D103313#2787316 <https://reviews.llvm.org/D103313#2787316>, @craig.topper wrote:

> Do we need to add this to RISCVTargetStreamer::emitTargetAttributes?

Yes, that, but also RISCVAsmParser::parseDirectiveAttribute and ELFObjectFileBase::getRISCVFeatures, though it seems that last one has been a bit neglected.



================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:294-295
       HasM = true;
+    else if (Feature == "+experimental-zmmul")
+      HasZmmul = true;
     else if (Feature == "+a")
----------------
These are supposed to be (approximately) sorted in terms of their canonical ordering. I don't know where Zmmul is proposed to go relative to the other Zfoo's, but it belongs down somewhere in there, I guess alphabetical if we don't know any better, not up here with the single-letter extensions.


================
Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.h:38
   bool HasStdExtM = false;
+  bool HasStdExtZmmul = false;
   bool HasStdExtA = false;
----------------
Ditto


================
Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.h:106
   bool hasStdExtM() const { return HasStdExtM; }
+  bool hasStdExtZmmul() const { return HasStdExtZmmul; }
   bool hasStdExtA() const { return HasStdExtA; }
----------------
Ditto


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103313/new/

https://reviews.llvm.org/D103313



More information about the cfe-commits mailing list