This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR bootstrap/11297


On Fri, Jun 27, 2003 at 11:32:46AM -0400, David Edelsohn wrote:
> >>>>> Jakub Jelinek writes:
> 
> Jakub> No idea why is current rs6000_output_mi_thunk clearing SYMBOL_FLAG_LOCAL.
> Jakub> Certainly the code before 2003-01-08 rewrite used to emit b .LTHUNK0@local
> Jakub> if function binds locally, now it does not.
> 
> 	This was a change to my original logic made by Alan Modra.  I'd
> like to hear his opinion.

Before a change I made on 2003-04-30 to use the new SYMBOL_REF_FLAGS
the code looked like this:

  funexp = XEXP (DECL_RTL (function), 0);
  SYMBOL_REF_FLAG (funexp) = 0;
  if (current_file_function_operand (funexp, VOIDmode)
      && (! lookup_attribute ("longcall",
                              TYPE_ATTRIBUTES (TREE_TYPE (function)))
          || lookup_attribute ("shortcall",
                               TYPE_ATTRIBUTES (TREE_TYPE (function)))))
    SYMBOL_REF_FLAG (funexp) = 1;

Richard Henderson pointed out that current_file_function_operand always
returned zero when SYMBOL_REF_FLAG was zero, so I replaced that with
the following to continue to clear the flag to retain the same behavior:

  funexp = XEXP (DECL_RTL (function), 0);
  SYMBOL_REF_FLAGS (funexp) &= !SYMBOL_FLAG_LOCAL;

Before the code used SYMBOL_REF_FLAG, though, it would handle local
symbols more directly, and symbols that weren't handled here could still
be handled elsewhere.  current_file_function_operand has changed so that
it can now return 1 when SYMBOL_FLAG_LOCAL is not set, so it's quite
possible that some form of the original code needs to go back in here
to determine whether SYMBOL_FLAG_LOCAL should be set or not.

I hope this helps explain why the flag is currently being cleared.

Janis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]