Page 1 of 1

Support for ARM CLZ instruction

Posted: Sun Sep 27, 2009 11:18 am
by njj
Hi,

Does anybody know if this version of the gcc tool chain supports the ARMs Count leading zero opcode? If so, which compiler intrinsic is it?

For example, I would like to do something like this.

u32 Word;
u32 Bit = __CLZ( Word );

Cheers..

Re: Support for ARM CLZ instruction

Posted: Mon Sep 28, 2009 12:39 pm
by WinterMute
You're looking for __builtin_clz which has been available since gcc 3.4.

Re: Support for ARM CLZ instruction

Posted: Tue Sep 29, 2009 7:48 am
by njj
That's the one. Thx..