m3-sys/m3cc/gcc-apple/gcc/varasm.c
/* Output the assembler code for a define (equate) using ASM_OUTPUT_DEF
   or ASM_OUTPUT_DEF_FROM_DECLS.  The function defines the symbol whose
   tree node is DECL to have the value of the tree node TARGET.  */
Output the assembler code for a define (equate) using ASM_OUTPUT_DEF
or ASM_OUTPUT_DEF_FROM_DECLS.  The function defines the symbol whose
tree node is DECL to have the value of the tree node TARGET.
Output the assembler code for a define ( equate ) using ASM_OUTPUT_DEF or ASM_OUTPUT_DEF_FROM_DECLS . The function defines the symbol whose tree node is DECL to have the value of the tree node TARGET .
static void
do_assemble_alias (tree decl, tree target)
{
  if (TREE_ASM_WRITTEN (decl))
    return;
  TREE_ASM_WRITTEN (decl) = 1;
  TREE_ASM_WRITTEN (DECL_ASSEMBLER_NAME (decl)) = 1;
  if (lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)))
    {
      ultimate_transparent_alias_target (&target);
      if (!TREE_SYMBOL_REFERENCED (target))
	weakref_targets = tree_cons (decl, target, weakref_targets);
#ifdef ASM_OUTPUT_WEAKREF
      ASM_OUTPUT_WEAKREF (asm_out_file, decl,
			  IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
			  IDENTIFIER_POINTER (target));
#else
      if (!SUPPORTS_WEAK)
	{
	  error ("%Jweakref is not supported in this configuration", decl);
	  return;
	}
#endif
      return;
    }
#ifdef ASM_OUTPUT_DEF
  if (TREE_PUBLIC (decl))
    {
      globalize_decl (decl);
      maybe_assemble_visibility (decl);
    }
# ifdef ASM_OUTPUT_DEF_FROM_DECLS
  ASM_OUTPUT_DEF_FROM_DECLS (asm_out_file, decl, target);
# else
  ASM_OUTPUT_DEF (asm_out_file,
		  IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
		  IDENTIFIER_POINTER (target));
# endif
#elif defined (ASM_OUTPUT_WEAK_ALIAS) || defined (ASM_WEAKEN_DECL)
  {
    const char *name;
    tree *p, t;
    name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
# ifdef ASM_WEAKEN_DECL
    ASM_WEAKEN_DECL (asm_out_file, decl, name, IDENTIFIER_POINTER (target));
# else
    ASM_OUTPUT_WEAK_ALIAS (asm_out_file, name, IDENTIFIER_POINTER (target));
# endif
    for (p = &weak_decls; (t = *p) ; )
      if (DECL_ASSEMBLER_NAME (decl) == DECL_ASSEMBLER_NAME (TREE_VALUE (t)))
	*p = TREE_CHAIN (t);
      else
	p = &TREE_CHAIN (t);
    for (p = &weakref_targets; (t = *p) ; )
      {
	if (DECL_ASSEMBLER_NAME (decl)
	    == ultimate_transparent_alias_target (&TREE_VALUE (t)))
	  *p = TREE_CHAIN (t);
	else
	  p = &TREE_CHAIN (t);
      }
  }
#endif
}
static void do_assemble_alias ( tree decl , tree target ) { if ( TREE_ASM_WRITTEN ( decl ) ) return ; TREE_ASM_WRITTEN ( decl ) = 1 ; TREE_ASM_WRITTEN ( DECL_ASSEMBLER_NAME ( decl ) ) = 1 ; if ( lookup_attribute ( " " , DECL_ATTRIBUTES ( decl ) ) ) { ultimate_transparent_alias_target ( & target ) ; if ( ! TREE_SYMBOL_REFERENCED ( target ) ) weakref_targets = tree_cons ( decl , target , weakref_targets ) ; #ifdef ASM_OUTPUT_WEAKREF ASM_OUTPUT_WEAKREF ( asm_out_file , decl , IDENTIFIER_POINTER ( DECL_ASSEMBLER_NAME ( decl ) ) , IDENTIFIER_POINTER ( target ) ) ; #else if ( ! SUPPORTS_WEAK ) { error ( " " , decl ) ; return ; } #endif return ; } #ifdef ASM_OUTPUT_DEF if ( TREE_PUBLIC ( decl ) ) { globalize_decl ( decl ) ; maybe_assemble_visibility ( decl ) ; } # ifdef ASM_OUTPUT_DEF_FROM_DECLS ASM_OUTPUT_DEF_FROM_DECLS ( asm_out_file , decl , target ) ; # else ASM_OUTPUT_DEF ( asm_out_file , IDENTIFIER_POINTER ( DECL_ASSEMBLER_NAME ( decl ) ) , IDENTIFIER_POINTER ( target ) ) ; # endif #elif defined ( ASM_OUTPUT_WEAK_ALIAS ) || defined ( ASM_WEAKEN_DECL ) { const char * name ; tree * p , t ; name = IDENTIFIER_POINTER ( DECL_ASSEMBLER_NAME ( decl ) ) ; # ifdef ASM_WEAKEN_DECL ASM_WEAKEN_DECL ( asm_out_file , decl , name , IDENTIFIER_POINTER ( target ) ) ; # else ASM_OUTPUT_WEAK_ALIAS ( asm_out_file , name , IDENTIFIER_POINTER ( target ) ) ; # endif for ( p = & weak_decls ; ( t = * p ) ; ) if ( DECL_ASSEMBLER_NAME ( decl ) == DECL_ASSEMBLER_NAME ( TREE_VALUE ( t ) ) ) * p = TREE_CHAIN ( t ) ; else p = & TREE_CHAIN ( t ) ; for ( p = & weakref_targets ; ( t = * p ) ; ) { if ( DECL_ASSEMBLER_NAME ( decl ) == ultimate_transparent_alias_target ( & TREE_VALUE ( t ) ) ) * p = TREE_CHAIN ( t ) ; else p = & TREE_CHAIN ( t ) ; } } #endif }
Output the assembler code for a define (equate) using ASM_OUTPUT_DEF
or ASM_OUTPUT_DEF_FROM_DECLS.
Output the assembler code for a define ( equate ) using ASM_OUTPUT_DEF or ASM_OUTPUT_DEF_FROM_DECLS .
/* Make name accessible from other files, if appropriate.  */ /* Remove this function from the pending weak list so that
       we do not emit multiple .weak directives for it.  */ /* Remove weakrefs to the same target from the pending weakref
       list, for the same reason.  */