[PATCH] D72183: [ELF][PPC64] Add --lax-call-lacks-nop

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 5 22:43:56 PST 2020


ruiu added inline comments.


================
Comment at: lld/ELF/InputSection.cpp:979-980
+        // runtime. Just ignore if --lax-call-lacks-nop is specified.
         if ((bufLoc + 8 > bufEnd || read32(bufLoc + 4) != 0x60000000) &&
-            rel.sym->file != file) {
+            !(config->laxCallLacksNop && rel.sym->file == file)) {
+          std::string hint;
----------------
Can this condition be reduced to

  !config->laxCallLacksNop && rel.sym->file != file &&
  (bufLoc + 8 > bufEnd || read32(bufLoc + 4) != 0x60000000)

?


================
Comment at: lld/ELF/Options.td:225
+    HelpText<"(PowerPC64) Don't error on b/bl not followed by nop, if the target is "
+             "defined in the same file. This is for compatibility with GCC<5.4 and GCC<6.4">;
+
----------------
Does this mean "GCC 5.4 or earlier AND GCC 6.4 or earlier"? Did you mean GCC 5.4 to 6.4?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72183





More information about the llvm-commits mailing list