
Dear zzs,
In message 20110715161531.GA5221@greatfirst.com you wrote:
Today I found the "wrong code" :
Very well - thanks.
and the __udivsi3 contain the "wrong code" :
20111cfc <__udivsi3>: 20111cfc: e2512001 subs r2, r1, #1 ; 0x1 20111d00: 012fff1e bxeq lr 20111d04: 3a000023 bcc 20111d98 <__udivsi3+0x9c> 20111d08: e1500001 cmp r0, r1 20111d0c: 9a00001a bls 20111d7c <__udivsi3+0x80> 20111d10: e1110002 tst r1, r2 20111d14: 0a00001b beq 20111d88 <__udivsi3+0x8c> 20111d18: e16f3f11 clz r3, r1 # ***this is the "wrong code" 20111d1c: e16f2f10 clz r2, r0 20111d20: e0432002 sub r2, r3, r2
...
Architectures
This instruction is available in ARM architecture versions 5 and above.
But at91rm9200 is armv4.
This is to be expected. It comes from using the GCC library routines from ELDK, which are configured for an ARMv5TE architecture.
Does this mean I can't use eldk5.0 for at91rm9200 ? If yes, How can I
You can use it, but you must make sure to rebuild the needed GCC library routines as needed for your target.
See the USE_PRIVATE_LIBGCC make option, i. e. use:
USE_PRIVATE_LIBGCC=yes make ...
Best regards,
Wolfgang Denk