[Bug target/68937] i686: -fno-plt produces wrong code (maybe only with tailcall)

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Dec 16 13:33:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68937

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
There is

static bool
ix86_function_ok_for_sibcall (tree decl, tree exp)
{
  tree type, decl_or_type;
  rtx a, b; 

  /* If we are generating position-independent code, we cannot sibcall
     optimize direct calls to global functions, as the PLT requires
     %ebx be live. (Darwin does not have a PLT.)  */
  if (!TARGET_MACHO
      && !TARGET_64BIT
      && flag_pic
      && flag_plt
      && decl && !targetm.binds_local_p (decl))
    return false;

Why dos RA pick callee-saved register as GOT base in jmp?


More information about the Gcc-bugs mailing list