On Mon, May 18, 2015 at 5:45 AM, Michael Matz <m...@suse.de> wrote: > Hi, > > On Sun, 17 May 2015, H.J. Lu wrote: > >> To remove one direct branch to PLT for external function calls: >> >> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00001.html >> >> I am proposing to add 2 new relocations, R_X86_64_RELAX_PC32 and >> R_X86_64_RELAX_GOTPCREL: >> >> 1. R_X86_64_RELAX_PC32 can only be used on 32-bit direct call/jmp >> instructions with a relax prefix, 0x67, which is the address size >> prefix and is ignored by 32-bit direct call/jmp instructions in both >> 32-bit and 64-bit modes. > > Hmm, are we Really Sure, this use of a prefix doesn't hit us over the head > somewhen? Why can't we simply use a 0x90 nop for this? After all, those > are free in recent pipelines, and new enough binutils supporting this > scheme will remove it anyway (in one direction), or are free to add any > one byte padding they require (for direct jumps they can for instance add > it _after_ the jump making it totally free).
This proposal has been replaced by https://groups.google.com/forum/#!topic/x86-64-abi/JZzuYlRKH8o -- H.J.