diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 21:57:13 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 21:57:13 +0000 |
commit | 549aab72b1897b579be5f894a4fdc26083590cf7 (patch) | |
tree | 908fc4e9290a416e1c851c8683a076b5d6982f1b /gcc/config/mep/mep.c | |
parent | 07932ea7c4fd4a2fb44e8ddabd0eef35b121ba61 (diff) | |
download | gcc-549aab72b1897b579be5f894a4fdc26083590cf7.tar.gz |
* langhooks.c (add_builtin_type): New function.
* langhooks.h (add_builtin_type): Export it.
* config/mep/mep.c (mep_init_builtins): Use it.
* config/rs6000/rs6000.c (rs6000_init_builtins): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184960 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mep/mep.c')
-rw-r--r-- | gcc/config/mep/mep.c | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index 39d9cf95d30..4351702fa4b 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -6059,33 +6059,17 @@ mep_init_builtins (void) v4uhi_type_node = build_vector_type (unsigned_intHI_type_node, 4); v2usi_type_node = build_vector_type (unsigned_intSI_type_node, 2); - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_data_bus_int"), - cp_data_bus_int_type_node)); - - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_vector"), - opaque_vector_type_node)); - - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_v8qi"), - v8qi_type_node)); - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_v4hi"), - v4hi_type_node)); - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_v2si"), - v2si_type_node)); - - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_v8uqi"), - v8uqi_type_node)); - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_v4uhi"), - v4uhi_type_node)); - (*lang_hooks.decls.pushdecl) - (build_decl (BUILTINS_LOCATION, TYPE_DECL, get_identifier ("cp_v2usi"), - v2usi_type_node)); + add_builtin_type ("cp_data_bus_int", cp_data_bus_int_type_node); + + add_builtin_type ("cp_vector", opaque_vector_type_node); + + add_builtin_type ("cp_v8qi", v8qi_type_node); + add_builtin_type ("cp_v4hi", v4hi_type_node); + add_builtin_type ("cp_v2si", v2si_type_node); + + add_builtin_type ("cp_v8uqi", v8uqi_type_node); + add_builtin_type ("cp_v4uhi", v4uhi_type_node); + add_builtin_type ("cp_v2usi", v2usi_type_node); /* Intrinsics like mep_cadd3 are implemented with two groups of instructions, one which uses UNSPECs and one which uses a specific |