[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
Tue May 31 11:13:29 PDT 2016


rafael added inline comments.

================
Comment at: ELF/Target.cpp:746
@@ -742,2 +745,3 @@
   // Relax mov.
   if (Op == 0x8b)
+    return R_RELAX_GOT_PC;
----------------
A mov can be relaxed into a "mov $" if we are producing a non pic output. No need to do it now,  but add a fixme about it.

================
Comment at: ELF/Target.cpp:797
@@ +796,3 @@
+  // 2) http://wiki.osdev.org/X86-64_Instruction_Encoding
+  // 3) http://www.swansontec.com/sintel.html
+  assert(!Config->Pic);
----------------
These are for the encoding? Maybe refer the official intel docs?

================
Comment at: ELF/Target.cpp:801
@@ +800,3 @@
+  if (Op == 0x85) {
+    // See 0x85 description in (1). Column "o" has "r" what indicates that the
+    // instruction uses "full" ModR / M byte, (no opcode extension).
----------------
Which instruction is this? testq?

================
Comment at: test/ELF/gotpc-relax-nopic.s:92
@@ +91,3 @@
+_start:
+  adcl    bar at GOTPCREL(%rip), %eax
+  addl    bar at GOTPCREL(%rip), %ebx
----------------
Not sure there is any value is testing movl in here.  We know we don't produce a relaxable relocation with mc.


http://reviews.llvm.org/D20793





More information about the llvm-commits mailing list