Compilers don't really generate assembly code (at least not anymore),
but the -S option requests the compiler to produce a file containing
a (PowerPC in this case) assembly language file representing the
machine code that is actually generated. Typically, compilers will
rewrite code considerably for the sake of efficiency. To understand
why, keep in mind that not all operations take the same amount of
time: retrieving a value from a register is orders of magnitude
faster than retrieving the same value from main memory (because DRAM
is slow, and it typically will take about 4 bus cycles, anyway). To
get an idea of what kinds of "modifications" the compiler makes to
your code, consider a program in which you set a variable, e.g. with
something like
SET X=1
but you never, ever change the value of X. Then, it would be
extremely wasteful to translate
SET Y=Y+X
by retrieving the value of X and then adding it to (the value of Y).
Typically, operations at the digital logic level will execute in
nanoseconds (or better), but a memory reference might take 10
microseconds (or worse). And that, of course, assumes on board memory.
===
Gregory Woodhouse
[EMAIL PROTECTED]
"The most incomprehensible thing about
the world is that it is at all comprehensible."
--Albert Einstein (1879-1955)
On Jul 17, 2005, at 9:36 PM, Nancy Anthracite wrote:
OK, put that in English. What is the -S option? My guess that
since M is
written in C, that it is what happens to M when it is compiled
before it
becomes machine language ??
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members