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

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

      else if (ix86_function_regparm (fntype, fndecl) == 3) 
        {
          /* For regparm 3, we have no free call-clobbered registers in
             which to store the static chain.  In order to implement this,
             we have the trampoline push the static chain to the stack.
             However, we can't push a value below the return address when
             we call the nested function directly, so we have to use an
             alternate entry point.  For this we use ESI, and have the
             alternate entry point push ESI, so that things appear the
             same once we're executing the nested function.  */
          if (incoming_p)
            {
              if (fndecl == current_function_decl)
                ix86_static_chain_on_stack = true; 
              return gen_frame_mem (SImode,
                                    plus_constant (Pmode,
                                                   arg_pointer_rtx, -8)); 
            }
          regno = SI_REG;
        }

Reply via email to