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: sparc symbol_ref_flags usage


On Thu, Apr 17, 2003 at 03:31:22AM -0700, Richard Henderson wrote:
>         * config/sparc/sparc.c (sparc_encode_section_info): Remove.
>         (data_segment_operand): Use SYMBOL_REF_FUNCTION_P.
>         (text_segment_operand): Likewise.
> 
> @@ -820,7 +816,7 @@ data_segment_operand (op, mode)
>    switch (GET_CODE (op))
>      {
>      case SYMBOL_REF :
> -      return ! SYMBOL_REF_FLAG (op);
> +      return ! SYMBOL_REF_FUNCTION_P (op);

Shouldn't this be ! (TARGET_CM_EMBMEDANY && SYMBOL_REF_FUNCTION_P (op));

>      case PLUS :
>        /* Assume canonical format of symbol + constant.
>  	 Fall through.  */
> @@ -844,7 +840,7 @@ text_segment_operand (op, mode)
>      case LABEL_REF :
>        return 1;
>      case SYMBOL_REF :
> -      return SYMBOL_REF_FLAG (op);
> +      return SYMBOL_REF_FUNCTION_P (op);

And this TARGET_CM_EMBMEDANY && SYMBOL_REF_FUNCTION_P (op);

>      case PLUS :
>        /* Assume canonical format of symbol + constant.
>  	 Fall through.  */
> @@ -8527,19 +8523,6 @@ sparc_rtx_costs (x, code, outer_code, to
>      default:
>        return false;
>      }
> -}
> -
> -/* If we are referencing a function make the SYMBOL_REF special.  In
> -   the Embedded Medium/Anywhere code model, %g4 points to the data
> -   segment so we must not add it to function addresses.  */
> -
> -static void
> -sparc_encode_section_info (decl, first)
> -     tree decl;
> -     int first ATTRIBUTE_UNUSED;
> -{
> -  if (TARGET_CM_EMBMEDANY && TREE_CODE (decl) == FUNCTION_DECL)
> -    SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

	Jakub


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