]> gcc.gnu.org Git - gcc.git/commitdiff
optabs.c (set_conv_libfunc): Prefer libgcc2's __ffsMM2 functions over an external...
authorRichard Sandiford <richard@codesourcery.com>
Tue, 24 Apr 2007 06:46:37 +0000 (06:46 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 24 Apr 2007 06:46:37 +0000 (06:46 +0000)
gcc/
* optabs.c (set_conv_libfunc): Prefer libgcc2's __ffsMM2 functions
over an external ffs function.

From-SVN: r124096

gcc/ChangeLog
gcc/optabs.c

index 3983b4279381ceb20b64f29d491b57b8739c3c05..b77b42da6c97417f3e0758c3c0e1a369a442d4b6 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-24  Richard Sandiford  <richard@codesourcery.com>
+
+       * optabs.c (set_conv_libfunc): Prefer libgcc2's __ffsMM2 functions
+       over an external ffs function.
+
 2007-04-24  Chao-ying Fu  <fu@mips.com>
            Richard Sandiford  <richard@nildram.co.uk>
 
index 49e01217414eb8633ffdf054b60a7f69d7d3c018..b63acccba50627605f1864b10fc8c294e77e681f 100644 (file)
@@ -5411,6 +5411,7 @@ void
 init_optabs (void)
 {
   unsigned int i;
+  enum machine_mode int_mode;
 
   /* Start by initializing all tables to contain CODE_FOR_nothing.  */
 
@@ -5620,6 +5621,11 @@ init_optabs (void)
   /* Fill in the optabs with the insns we support.  */
   init_all_optabs ();
 
+  /* The ffs function operates on `int'.  Fall back on it if we do not
+     have a libgcc2 function for that width.  */
+  int_mode = mode_for_size (INT_TYPE_SIZE, MODE_INT, 0);
+  ffs_optab->handlers[(int) int_mode].libfunc = init_one_libfunc ("ffs");
+
   /* Initialize the optabs with the names of the library functions.  */
   init_integral_libfuncs (add_optab, "add", '3');
   init_floating_libfuncs (add_optab, "add", '3');
@@ -5731,10 +5737,6 @@ init_optabs (void)
     abs_optab->handlers[TYPE_MODE (complex_double_type_node)].libfunc
       = init_one_libfunc ("cabs");
 
-  /* The ffs function operates on `int'.  */
-  ffs_optab->handlers[(int) mode_for_size (INT_TYPE_SIZE, MODE_INT, 0)].libfunc
-    = init_one_libfunc ("ffs");
-
   abort_libfunc = init_one_libfunc ("abort");
   memcpy_libfunc = init_one_libfunc ("memcpy");
   memmove_libfunc = init_one_libfunc ("memmove");
This page took 0.068254 seconds and 5 git commands to generate.