This patch is mainly to fix a regression on trunk with support for __ctzsi2 on cores that do not have the CLZ instruction (notably pre-v5 and cortex-m0). It's needed after a recent change to longlong.h which now defines count_trailing_zeros to use the GCC builtin: unfortunately that builtin is used in the default libgcc definition of __ctzsi2 and gcc furthermore falls back when it has no sequence to implement that builting by calling the __ctzsi2 helper function... The patch addresses the problem by providing suitable assembly-language definitions that break the recursive loop. They're also marginally optimized over the alternative of calling __clzsi2 to provide the implementation. Tested on bare metal for both thumb1 and pre-v5 ARM and committed to trunk. No need for additional tests, this fixes FAILs on the FFS2 tests. * arm/lib1funcs.asm (ctzsi2): New function. * arm/t-elf (LIB1ASMFUNCS): Add _ctzsi2. * arm/t-linux (LIB1ASMFUNCS): Likewise. * arm/t-strongarm-elf (LIB1ASMFUNCS): Likewise. * arm/t-symbian (LIB1ASMFUNCS): Likewise. * arm/t-vxworks (LIB1ASMFUNCS): Likewise. * arm/t-wince-pe (LIB1ASMFUNCS): Likewise. R.