[PATCH] D123515: [RISCV] Support '.option arch' directive

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 11 00:55:48 PST 2023


jrtc27 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2324
+              ArchLoc,
+              "mix extension list with full arch string is not allowed!");
+
----------------
These errors all need their grammar fixing


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp:37
 void RISCVTargetStreamer::emitDirectiveVariantCC(MCSymbol &Symbol) {}
+void RISCVTargetStreamer::emitDirectiveOptionArchEqual(StringRef Value,
+                                                       bool &hasDotOption,
----------------
This is a *weird* interface


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp:147
+  emitDirectiveOptionArchPrefix(OS, PrefixEmitted);
+  OS << "\"" << Value << "\"";
+  emitCommaOrNextLine(OS, EmitComma);
----------------
You're still putting quotes around it


================
Comment at: llvm/test/MC/RISCV/option-invalid.s:17
+# CHECK: :[[#@LINE+1]]:23: error: mix extension list with full arch string is not allowed!
+.option arch, +f, +d, "rv32ifd", -d
+
----------------
Stop using quotes except when specifically testing that quotes get rejected


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123515



More information about the llvm-commits mailing list