Question

I've only been Googling for a couple hours or so, but if someone has a quick answer to this I'd like to get back to programming. Here's my error:

jcomeau@intrepid:~/rentacoder/jcomeau/armmite$ make
/usr/local/bin/preasm.tcl minimal.asm minimal.s 
"/usr/arm-linux-gnueabi/bin/as" -mcpu=arm7tdmi-s -mapcs-32 \
     -gstabs -ahls=minimal.lst  -o minimal.o minimal.s
minimal.s: Assembler messages:
minimal.s:183: Error: selected processor does not support `clz r0,r0'
make: *** [minimal.o] Error 1
rm minimal.s

I've tried with -mcpu=arm7tdmi as well, which is what Coridium uses for their code for the ARMmite v.2, the board I'm using. But they apparently don't have any clz instructions in their code. My question is, should it work, and it's just that my assembler doesn't realize it, or does this chip really not implement CLZ?

[update: according to http://www.keil.com/dd/chip/3974.htm, arm7tdmi-s is the correct architecture specification]

[further update: I coded the instruction manually with .word 0xe16f0f10 and instead of the expected undefined instruction error I got a data abort. strange.]

Was it helpful?

Solution

The CLZ instruction was introduced in ARMv5. The ARM7TDMI and ARM9 do not have this instruction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top