Support for ARM CLZ instruction

support for the ARM toolchain
Post Reply
njj
Posts: 4
Joined: Sun Sep 27, 2009 11:12 am

Support for ARM CLZ instruction

Post by njj » Sun Sep 27, 2009 11:18 am

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..

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Support for ARM CLZ instruction

Post by WinterMute » Mon Sep 28, 2009 12:39 pm

You're looking for __builtin_clz which has been available since gcc 3.4.
Help keep devkitPro toolchains free, Donate today

Personal Blog

njj
Posts: 4
Joined: Sun Sep 27, 2009 11:12 am

Re: Support for ARM CLZ instruction

Post by njj » Tue Sep 29, 2009 7:48 am

That's the one. Thx..

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest