[PATCH] D20793: [ELF] - Implemented support for test/binop relaxations from latest ABI.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 09:32:56 PDT 2016


rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.

LGTM with nits


================
Comment at: ELF/Target.cpp:759
@@ +758,3 @@
+  // they are 32bit operations and not common to have.
+  return (!Config->Pic && Type == R_X86_64_REX_GOTPCRELX) ? R_RELAX_GOT_PC_NOPIC
+                                                          : RelExpr;
----------------
You can drop the Type == R_X86_64_REX_GOTPCRELX making this just

return Config->Pic ? RelExpl : R_RELAX_GOT_PC_NOPIC;

no?

================
Comment at: ELF/Target.cpp:782
@@ +781,3 @@
+      *(Loc - 1) = 0xe8; // call
+    }
+    else {
----------------
git-clang-format

================
Comment at: test/ELF/gotpc-relax-nopic.s:16
@@ +15,3 @@
+## 73728 = 0x12000 (bar)
+## Notice, that 32bit versions of operations are not relaxed.
+# DISASM:      Disassembly of section .text:
----------------
Comment out of date.


http://reviews.llvm.org/D20793





More information about the llvm-commits mailing list