[PATCH] D79625: [PowerPC] Extend .reloc directive on PowerPC

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 14:31:38 PDT 2020


amyk added inline comments.


================
Comment at: llvm/lib/MC/MCExpr.cpp:325
   case VK_PPC_NOTOC: return "notoc";
+  case VK_PPC_LINKER_OPT: return "ppclinkeropt";
   case VK_COFF_IMGREL32: return "IMGREL";
----------------
I noticed for other PPC VariantKinds, we don't put the ppc part in the string. Is there a reason why we call it `ppclinkeropt` instead of just `linkeropt`? Is it since linkeropt might sound too generic?


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:174
+
+    if (Symbol.isVariable()) {
+      const MCExpr *SymbolExpr = Symbol.getVariableValue();
----------------
Maybe early exit/break here instead then return false at the end, like how it is in the `MCExpr::Binary`?


================
Comment at: llvm/test/MC/PowerPC/future-reloc-with-expr.s:6
+##
+# This section of tests contains the MCBinaryExpr as the first paremter of the
+# .reloc relocation.
----------------
s/paremter/parameter


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79625





More information about the llvm-commits mailing list