loop to look for a free slot in a page entry.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93738
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-01-16 Steven Bosscher <stevenb@suse.de>
+
+ * ggc-page.c (ggc_alloc_stat): Use __builtin_ctzl instead of a
+ loop to look for a free slot in a page entry.
+
2005-01-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/16304
2005-01-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/16304
word = bit = 0;
while (~entry->in_use_p[word] == 0)
++word;
word = bit = 0;
while (~entry->in_use_p[word] == 0)
++word;
+
+#if GCC_VERSION >= 3004
+ bit = __builtin_ctzl (~entry->in_use_p[word]);
+#else
while ((entry->in_use_p[word] >> bit) & 1)
++bit;
while ((entry->in_use_p[word] >> bit) & 1)
++bit;
hint = word * HOST_BITS_PER_LONG + bit;
}
hint = word * HOST_BITS_PER_LONG + bit;
}