[PATCH] D20622: [ELF] - Added support for jmp/call relaxations when R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX are used.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 09:29:50 PDT 2016

grimar added a comment.

In http://reviews.llvm.org/D20622#439251, @rafael wrote:

> > +      // Convert jmp *foo at GOTPCREL(%rip) to jmp foo nop.
> Can't you use a prefix in here?

Ah, I think I know ! ABI says:
jmp *foo at GOTPCREL(%rip) can be relaxed to jmp foo nop

For call it gives 2 ways:
call foo nop
nop call foo

But for jump only one way allowed . Therefore we can't switch nop to something else,
like adding instruction prefix without violation of ABI.

> Cheers,

> Rafael


More information about the llvm-commits mailing list