This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ARM instructions -- CLZ


Does binutils support the ARM CLZ instruction?
I have an arm7tdmi and am compiling with -mcpu-arm7tdmi.

This is the macro I'm using...

#define count_leading_zeroes(a) \
({ uint32 __value, __arg = (a); \
    asm ("clz\t%0, %1": "=r" (__value): "r" (__arg)); \
    __value; })

and the C is...

unsigned count = count_leading_zeroes( num);

which produces the proper assembler (in the .s file compiling with -S)
	clz	r2, r3
(which makes sense in context)

Unfortunately, it's a big crash and burn.
/tmp/ccQbzMp6.s: Assembler messages:
/tmp/ccQbzMp6.s:17: Error: bad instruction `clz r2,r3'

Any thoughts?

Thanks,
Shaun Jackman


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]