This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc code bloat again


> 
> this is gcc 2.95.1 on arm linux
> I wonder if someone could kindly explain why gcc produces this output for
> the constructor of an object and maybe give some suggestions how to avoid
> it.
> The size of the constructor code is 300 bytes!  The source  compiled with
> -O2 -fomit-frame-pointer flags
> By contrast, the code produced by Metrowerks 68k compiler is 46 bytes ( see
> the disassembly below)

Without source, it's hard to be sure what is happening, but much of the 
output looks to be related to using the set-jump version of exception 
(re-)throwing.  Try compiling the code with -fno-exceptions.  How does it 
compare then?  Does the Metroworks compiler support exceptions?

Gcc-3 will probably use dwarf2 table-based exceptions, so the code will 
probably be much tighter for your example, but without the source, I can't 
demonstrate.

R.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]