[U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug.

Wolfgang Denk
2006-12-22T21:33:58Z

Hello,

in message <1166809358.26147.32.camel@kaboom.lisle.iphase.com> you wrote:
>
> > Did you compare the generated code?
>
> Nope, but that's a good idea. I'll compile and objdump the various
> scenarios next year.

I just did this - this is always pretty instructive in such situ-
ations. GCC-4.x optimizes much better, but will also unremorsefully
punish even small sins like a forgotten "volatile".

text data bss dec hex filename
202340 12104 32056 246500 3c2e4 /tmp/ELDK-3.1.1/u-boot
185751 12016 32048 229815 381b7 /tmp/ELDK-4.0/u-boot
------

That's nearly 10% difference in code size...

But here the difference is not in this function - both compile to
exactly the same code. Obviously some other functions in the CFI
driver are different, though.

> Merry Christmas from a very bad quoting net citizen. :P

Thanks, and Merry Christmas, too.

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
It is easier to change the specification to fit the program than vice
versa.