[PATCH ARM] Improve const_ok_for_arm

Richard Earnshaw Richard.Earnshaw@buzzard.freeserve.co.uk
Mon May 9 22:15:00 GMT 2005


This patch implements a slightly faster algorithm for testing whether a
CONST_INT is a valid immediate value.  The algorithm relies on using ffs(),
but that can generally be calculated very quickly (either expanded inline
to a small number of instructions, or in a library with a table lookup).
The improvement is relatively small, but it is measurable on both bootstrap
and testsuite times.

Tested on arm-netbsdelf and on an arm-elf cross with no regressions.

2005-05-09  Richard Earnshaw  <richard.earnshaw@arm.com>

	* arm.c (const_ok_for_arm): Use a faster algorithm.

R.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: const_ffs.patch
Type: text/x-patch
Size: 2178 bytes
Desc: const_ffs.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050509/28009e1a/attachment.bin>


More information about the Gcc-patches mailing list