gcc and assembly
Claudio Bley
bley@cs.uni-magdeburg.de
Wed Apr 3 16:08:00 GMT 2002
>>>>> "Stephen" == Stephen Turner <artic_knight@yahoo.com> writes:
Stephen> i heard you can optimize the code to assembly,
No, it is just a translation (compilation) into just another
language. This by itself does not lead to a performance gain in any
way.
There are four stages when producing executable files: preprocess,
compile, assemble, link. You may tell gcc to stop after the
compilation step, which will produce assembler output.
Stephen> i also heard the more you optimize the bigger it gets?
This depends on the optimization methods used and on the code. But
yes, this may be the case.
Stephen> i wanted to optimize linux into the pure asm code,
Stephen> so that it would be smaller faster and cleaner,
Stephen> well maybe not cleaner but smaller and faster.
This is an illusion. You can't do that without getting your hands
dirty (e.g. by hand writing asm code).
Stephen> whats the command to do this if there is one?
RTFM. 'gcc -S <file*>' will produce assembler code for each
non-assembler input file specified.
HTH
Claudio
More information about the Gcc-help
mailing list