[U-Boot-Users] Compiler question: integer division?

Wolfgang Denk wd at denx.de
Mon Apr 25 11:35:01 CEST 2005


In message <426CA9EF.6080003 at imc-berlin.de> you wrote:
> 
> How about
> 	a = b / 5;
>   ?
> Will that result in
> 	a = (b >> 2) - b;

We don't know which architecture you're using, and which  version  of
which compiler, so how can we know this?

Why don't you simply try this out yourself?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The price of curiosity is a terminal experience.
                         - Terry Pratchett, _The Dark Side of the Sun_




More information about the U-Boot mailing list