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]

Committed, CRIS: Visibility: remove "internal" tweaks, use MODULE_LOCAL_P.


The CRIS port doesn't have exactly the same problem as i386, but
that's just because of a wart.  On the other hand, considering
MODULE_LOCAL_P for the visibility indicator is just right.

	* config/cris/cris.c (cris_target_asm_function_prologue): Revert
	2002-03-12 internal visibility change. 
	(cris_encode_section_info): Consider MODULE_LOCAL_P when encoding
	visibility into SYMBOL_REF_FLAG.

Index: config/cris/cris.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.c,v
retrieving revision 1.18
diff -p -c -r1.18 cris.c
*** cris.c	2002/03/12 02:17:30	1.18
--- cris.c	2002/03/13 13:16:33
*************** cris_target_asm_function_prologue (file,
*** 857,875 ****
        framesize += size + cfoa_size;
      }
  
!   /* Set up the PIC register.  Not needed for a function marked with
!      visibility "internal".  */
    if (current_function_uses_pic_offset_table)
!     {
!       tree vis = lookup_attribute ("visibility", DECL_ATTRIBUTES (cfun->decl));
! 
!       if (!vis
! 	  || strcmp ("internal",
! 		     TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (vis)))))
! 	asm_fprintf (file, "\tmove.d $pc,$%s\n\tsub.d .:GOTOFF,$%s\n",
! 		     reg_names[PIC_OFFSET_TABLE_REGNUM],
! 		     reg_names[PIC_OFFSET_TABLE_REGNUM]);
!     }
  
    if (TARGET_PDEBUG)
      fprintf (file,
--- 857,867 ----
        framesize += size + cfoa_size;
      }
  
!   /* Set up the PIC register.  */
    if (current_function_uses_pic_offset_table)
!     asm_fprintf (file, "\tmove.d $pc,$%s\n\tsub.d .:GOTOFF,$%s\n",
! 		 reg_names[PIC_OFFSET_TABLE_REGNUM],
! 		 reg_names[PIC_OFFSET_TABLE_REGNUM]);
  
    if (TARGET_PDEBUG)
      fprintf (file,
*************** cris_encode_section_info (exp, first)
*** 3054,3064 ****
        if (DECL_P (exp))
  	{
  	  if (TREE_CODE (exp) == FUNCTION_DECL
! 	      && (TREE_PUBLIC (exp) || DECL_WEAK (exp)))
  	    SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0)) = 0;
  	  else
  	    SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0))
! 	      = ! TREE_PUBLIC (exp) && ! DECL_WEAK (exp);
  	}
        else
  	/* Others are local entities.  */
--- 3046,3058 ----
        if (DECL_P (exp))
  	{
  	  if (TREE_CODE (exp) == FUNCTION_DECL
! 	      && (TREE_PUBLIC (exp) || DECL_WEAK (exp))
! 	      && ! MODULE_LOCAL_P (exp))
  	    SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0)) = 0;
  	  else
  	    SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0))
! 	      = ((! TREE_PUBLIC (exp) && ! DECL_WEAK (exp))
! 		 || MODULE_LOCAL_P (exp));
  	}
        else
  	/* Others are local entities.  */

brgds, H-P


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