[PATCH] D56779: [ELF][X86_64] Fix corrupted LD -> LE optimization for TLS without PLT

Peter Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 16 14:24:16 PST 2019


Lekensteyn updated this revision to Diff 182150.
Lekensteyn marked 6 inline comments as done.
Lekensteyn added a comment.

> I mean why don't you move this comment inside `if (NextOp == 0xe8) {`?

Because memcpy only patches the first two instructions:

  // Convert
  //   leaq bar at tlsld(%rip), %rdi     # 48 8d 3d <Loc>
  //   callq __tls_get_addr at PLT       # e8 <disp32>

but not this one (which is why I initially left the comment on top):

  //   leaq bar at dtpoff(%rax), %rcx

I've now moved the comment verbatim and inlined the `NextOp` and `NextModRm` names.


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

https://reviews.llvm.org/D56779

Files:
  ELF/Arch/X86_64.cpp
  test/ELF/tls-opt-x86_64-noplt.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56779.182150.patch
Type: text/x-patch
Size: 4741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190116/9a48345e/attachment-0001.bin>


More information about the llvm-commits mailing list