Re: GCC ARM assembly questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phil Endecott writes:
 > Hi Priya,
 > 
 > Priya Narasimhan wrote:
 > > I am compiling relatively simple C programs using "gcc -S
 > > -fomit-frame-pointer -mcpu=xscale" on a gumstix (ARM Xscale) processor. I
 > > noticed that the generated assembly code has additional stuff in, beyond
 > > what I would typically see in a standard ARM assembly program (e.g., one
 > > that was generated instead through the ARM Development Suite toolchain). 
 > >
 > > For instance, I see the following comments in the GNU-generated assembly
 > > code. What do these signify? 
 > >
 > > @ zero_extendqisi2
 > > @ args =0, pretend =0 (what does pretend mean?)
 > > @ frame_needed = 0, uses_anonymous_args = 0 (what does uses_anonymous_args
 > > mean?)
 > 
 > I don't know, and I suspect that the answer is not very interesting.  
 > The best way to find answers to these questions is probably to study 
 > the gcc source code.
 > 
 > > Secondly, I notice that without the "-O" option, saving registers to the
 > > stack happens almost on every alternate line of the generated assembly code.
 > > What is the purpose of doing this?
 > 
 > Without -O, gcc runs faster.  It can run faster by not spending time 
 > working out what can be stored in registers, and just using the stack 
 > for everything.

This is important for debugging: you know that whenever a variable is
assigned, the value really is stored in the stack slot associated with
that variable.  In other words, it's a feature, not a bug.

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux