[PATCH] D14713: [ELF2] - Optimization for R_X86_64_GOTTPOFF relocation.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 01:53:00 PST 2015


grimar added inline comments.

================
Comment at: ELF/Target.cpp:367
@@ +366,3 @@
+// Opcodes info can be found at http://ref.x86asm.net/coder64.html#x48.
+void X86_64TargetInfo::relocateTlsOptimize(uint8_t *Loc, uint8_t *BufEnd,
+                                           uint32_t Type, uint64_t P,
----------------
ruiu wrote:
> Add BufStart and check for the bound.
Done.

================
Comment at: ELF/Target.cpp:370-374
@@ +369,7 @@
+                                           uint64_t SA) const {
+  uint8_t *Prefix = &Loc[-3];
+  uint8_t *Instruct = &Loc[-2];
+  uint8_t *RegSlot = &Loc[-1];
+  uint8_t Reg = (Loc[-1]) >> 3;
+  bool IsMovOp = *Instruct == 0x8b;
+  if (*Prefix == 0x4c)
----------------
ruiu wrote:
> Instruct -> Inst
> IsMovOp -> IsMov
Done.


http://reviews.llvm.org/D14713





More information about the llvm-commits mailing list