This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

size of code gcc creates (was "m68k-coff-gcc and NOPs")


Speaking of being out of prom space, from what I've been able to
determine, gcc is a pig when it comes to code space.

My application is buildable under two toolsets, Fiddes' gcc version 4 and
Mentor Graphics Microtec Research version 4.4.  Here's a comparison of
code (ROM) sizes with the two toolsets:

gcc:  655KB
Microtec:  560KB

As you can see, the code produced by gcc is almost 17% bigger--quite a
disparity!

Anyone have an opinion as to why this is so?





-------------------------------------------------------------------------
---

Scott,

Thanks for your reply. On further investigtion I have found that they
(the nops) are only generated when I use -fomit-frame-pointer and any
level of optimisation, e.g. -Os in my case (as you may have guess I am
short of PROM space). It is still a mystery why.

Regards, Chris

-------------------------------------------------------------------------
---

Chris,

Interesting.  I just generated an assembly source listing from one of my
m68k-coff-gcc-compiled .c files and I don't see any nops after the rts's.
 I wonder why?

Scott

-------------------------------------------------------------------------
---

Does anybody know why the 68K version of gcc compiles a NOP instruction
at the end of each function, after the RTS?                              
                          

-------------------------------------------------------------------------
---

------
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]