[U-Boot] eldk5.0 generate illegal instruction for at91rm9200

Wolfgang Denk wd at denx.de
Fri Jul 15 19:22:47 CEST 2011


Dear zzs,

In message <20110715161531.GA5221 at 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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
One of the advantages of being a captain is being able to ask for ad-
vice without necessarily having to take it.
	-- Kirk, "Dagger of the Mind", stardate 2715.2


More information about the U-Boot mailing list