From: Dan Malek <dan@netx4.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Dan Malek <dan@penguin.netx4.com>,
Christian Zankel <chris@mvista.com>,
cort@fsmlabs.com, linuxppc-dev@lists.linuxppc.org,
linuxppc-embedded@lists.linuxppc.org
Subject: Re: bootloader & head.S weirdness & restructuring
Date: Sun, 28 Nov 1999 17:41:17 -0500 [thread overview]
Message-ID: <3841AF8D.48EDE940@netx4.com> (raw)
In-Reply-To: Pine.GSO.4.10.9911261005360.29385-100000@dandelion.sonytel.be
Geert Uytterhoeven wrote:
> So what's wrong with the approach above?
Nothing....
> ...... All unused code will be optimized away
> by the compiler.
Maybe. I haven't seen much dead code elimination by
the compiler. I guess one of the bazillion compiler switch
combinations would do it. I haven't found a good one yet.
> .... There's no difference between the first and the second
> version, except that the first one is more readable.
Well, OK. Just to provide some history. When I did the
first 8xx ports, I used #ifdefs to remove large portions of
PMac, Prep, and CHRP nested case statements instead of
trying to rewrite something that I had no ability to test.
By using the #ifdefs, I could almost guarantee I didn't
break something that already exists. Although in some of
the files that contain the #ifdefs only a few lines of code
are conditional compiled, the big win was elimination of
function calls into other machine dependent files that
simply didn't have to be compiled. I think the Makefiles
look worse than the C code.......It may be nice to dynamically
generate the Makefiles for the configuration rather than have
the "if" statements in those.
It has now become a little more difficult to handle, although
I have noticed others are starting to use more #ifdefs around
other machine dependent code. If you want to support multiple
machines in one binary, define them and the code will support
it. I don't think the code will ever support a single binary
to run on an 8xx (or 82xx) and a PMac.
I have seen some pretty bad code over the past 20 years of my
career, and this stuff isn't even close to bad. That doesn't
mean I am not going to try to make it better, we just have
to do it carefully because any changes in these files affect
lots of people (and other files). Just remember that one of
my goals is to build small as possible embedded software that
reduces Flash ROM requirements. Carrying along stuff like
keyboard and ADB drivers just to resolve some symbols doesn't
help us do this.
-- Dan
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~1999-11-28 22:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-22 11:04 bootloader & head.S weirdness Benjamin Herrenschmidt
1999-11-22 21:37 ` Cort Dougan
1999-11-22 23:17 ` bootloader & head.S weirdness & restructuring Christian Zankel
1999-11-22 23:55 ` Cort Dougan
1999-11-23 3:31 ` Christian Zankel
1999-11-23 3:40 ` Cort Dougan
1999-11-23 6:37 ` Dan Malek
1999-11-23 18:22 ` Christian Zankel
1999-11-23 20:20 ` Dan Malek
1999-11-25 17:13 ` Geert Uytterhoeven
1999-11-25 19:49 ` Dan Malek
1999-11-26 9:06 ` Geert Uytterhoeven
1999-11-26 9:42 ` Michael Schmitz
1999-11-26 12:06 ` Wolfgang Denk
1999-11-28 22:41 ` Dan Malek [this message]
1999-11-29 7:12 ` Geert Uytterhoeven
1999-11-23 16:12 ` Michael Schmitz
1999-11-23 16:17 ` David Edelsohn
1999-11-23 17:46 ` Cort Dougan
1999-11-23 16:15 ` Gabriel Paubert
1999-11-23 16:52 ` Marcus Sundberg
1999-11-23 17:01 ` Gabriel Paubert
1999-11-23 17:45 ` Cort Dougan
1999-11-23 10:35 ` bootloader & head.S weirdness Benjamin Herrenschmidt
1999-11-23 10:50 ` Momchil Velikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3841AF8D.48EDE940@netx4.com \
--to=dan@netx4.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=chris@mvista.com \
--cc=cort@fsmlabs.com \
--cc=dan@penguin.netx4.com \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).