This is the mail archive of the gcc@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: Configuration issues on Itanium VMS


The TARGET_INIT_BUILTINS hook could, perhaps, be used to construct
invisible declarations for every function that requires a prefix (or
augment the invisible declarations for the functions that already have
them), setting DECL_ASSEMBLER_NAME appropriately.

Something like this?
It seems to work OK for functions that are not listed in builtins.def
For those functions, e.g. memmove, my new libname gets overwritten/ignored when the builtin is "built"
Not sure how to fix that...


--------------

/* Initialize the assembler name of function NAME to LIBNAME */

static void
vms_init_library_name (name, libname, type)
    const char *name, *libname;
    tree type;
{
 rtx symbol;
 tree decl
   = build_decl (FUNCTION_DECL, get_identifier (name),
   build_function_type (type, NULL_TREE));

 SET_DECL_ASSEMBLER_NAME (decl, get_identifier (libname));
 DECL_ARTIFICIAL (decl) = 1;
 DECL_EXTERNAL (decl) = 1;
 TREE_PUBLIC (decl) = 1;
 pushdecl (decl);
 make_decl_rtl (decl, NULL);
 symbol = XEXP (DECL_RTL (decl), 0);
 SYMBOL_REF_DECL (symbol) = 0;
}

void
ia64_init_builtins (void)
{
...
 vms_init_library_name ("memmove", "decc$memmove", ptr_type_node);
}


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