bootloader & head.S weirdness & restructuring

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Fri Nov 26 20:06:28 EST 1999


On Thu, 25 Nov 1999, Dan Malek wrote:
> Geert Uytterhoeven wrote:
> > Alternatively, you can base your decisions on specific features that are shared
> > among different machine types, and say
> > 
> >     if (has_feature_a) {
> >         ...
> >     }
> > 
> > instead of
> > 
> >     #if defined(CONFIG_x) || defined(CONFIG_y) || defined(CONFIG_z)
> >     ...
> >     #endif
> 
> Yes, but one of the things I am trying to do is reduce the
> code size and instructions to execute.  On a 500 MHz G4 with
> a Gigabyte of memory, a few extra instructions is no big deal.
> On a 33 MHz 8xx with 8 Mbytes of memory, you watch all of this
> pretty closely :-).

So what's wrong with the approach above? All unused code will be optimized away
by the compiler. There's no difference between the first and the second
version, except that the first one is more readable.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven ----------------- Sony Suprastructure Center Europe (SUPC-E)
Geert.Uytterhoeven at sonycom.com ------------------- Sint-Stevens-Woluwestraat 55
Voice +32-2-7248632 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list