]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/c4x/c4x.c
* langhooks.h (builtin_function): New langhook.
[thirdparty/gcc.git] / gcc / config / c4x / c4x.c
index 4e6dd8f5484e12ca4d9f7ea151ff216266798203..4011a51591aed718fe2c822966affc111a6ae24e 100644 (file)
@@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
+#include "langhooks.h"
 
 rtx smulhi3_libfunc;
 rtx umulhi3_libfunc;
@@ -4767,41 +4768,52 @@ c4x_init_builtins (void)
 {
   tree endlink = void_list_node;
 
-  builtin_function ("fast_ftoi",
-                   build_function_type 
-                   (integer_type_node,
-                    tree_cons (NULL_TREE, double_type_node, endlink)),
-                   C4X_BUILTIN_FIX, BUILT_IN_MD, NULL, NULL_TREE);
-  builtin_function ("ansi_ftoi",
-                   build_function_type 
-                   (integer_type_node, 
-                    tree_cons (NULL_TREE, double_type_node, endlink)),
-                   C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL, NULL_TREE);
+  lang_hooks.builtin_function ("fast_ftoi",
+                              build_function_type 
+                              (integer_type_node,
+                               tree_cons (NULL_TREE, double_type_node,
+                                          endlink)),
+                              C4X_BUILTIN_FIX, BUILT_IN_MD, NULL, NULL_TREE);
+  lang_hooks.builtin_function ("ansi_ftoi",
+                              build_function_type 
+                              (integer_type_node, 
+                               tree_cons (NULL_TREE, double_type_node,
+                                          endlink)),
+                              C4X_BUILTIN_FIX_ANSI, BUILT_IN_MD, NULL,
+                              NULL_TREE);
   if (TARGET_C3X)
-    builtin_function ("fast_imult",
-                     build_function_type
-                     (integer_type_node, 
-                      tree_cons (NULL_TREE, integer_type_node,
-                                 tree_cons (NULL_TREE,
-                                            integer_type_node, endlink))),
-                     C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL, NULL_TREE);
+    lang_hooks.builtin_function ("fast_imult",
+                                build_function_type
+                                (integer_type_node, 
+                                 tree_cons (NULL_TREE, integer_type_node,
+                                            tree_cons (NULL_TREE,
+                                                       integer_type_node,
+                                                       endlink))),
+                                C4X_BUILTIN_MPYI, BUILT_IN_MD, NULL,
+                                NULL_TREE);
   else
     {
-      builtin_function ("toieee",
-                       build_function_type 
-                       (double_type_node,
-                        tree_cons (NULL_TREE, double_type_node, endlink)),
-                       C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL, NULL_TREE);
-      builtin_function ("frieee",
-                       build_function_type
-                       (double_type_node, 
-                        tree_cons (NULL_TREE, double_type_node, endlink)),
-                       C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL, NULL_TREE);
-      builtin_function ("fast_invf",
-                       build_function_type 
-                       (double_type_node, 
-                        tree_cons (NULL_TREE, double_type_node, endlink)),
-                       C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL, NULL_TREE);
+      lang_hooks.builtin_function ("toieee",
+                                  build_function_type 
+                                  (double_type_node,
+                                   tree_cons (NULL_TREE, double_type_node,
+                                              endlink)),
+                                  C4X_BUILTIN_TOIEEE, BUILT_IN_MD, NULL,
+                                  NULL_TREE);
+      lang_hooks.builtin_function ("frieee",
+                                  build_function_type
+                                  (double_type_node, 
+                                   tree_cons (NULL_TREE, double_type_node,
+                                              endlink)),
+                                  C4X_BUILTIN_FRIEEE, BUILT_IN_MD, NULL,
+                                  NULL_TREE);
+      lang_hooks.builtin_function ("fast_invf",
+                                  build_function_type 
+                                  (double_type_node, 
+                                   tree_cons (NULL_TREE, double_type_node,
+                                              endlink)),
+                                  C4X_BUILTIN_RCPF, BUILT_IN_MD, NULL,
+                                  NULL_TREE);
     }
 }