This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Popping registers


> -----Original Message-----
> From: gcc-owner On Behalf Of Sam Lauber
> Sent: 21 December 2004 01:48
> To: Richard Henderson; gcc
> Subject: Re: Popping registers
> 
> >> I was wondering, how do you pop a register (like EAX) into 
> a C variable?
> > 
> > You don't.  Messing with the stack like that behind the compiler's
> > back is strictly verboten.
> > 
> > r~
> 
> What is a stack? What does the compiler use it for? Why would 
> messing with it be a bad idea? And no, I do not know 
> assembly, and I haven't had computer science class yet.
> 
> Samuel Lauber

  The "stack" is like a great big pile of junk where the compiler discards all
the old data it doesn't need any more, deleted strings, values of dead
variables, etc. etc., a bit like /dev/null only right inside the compiled
program.  It's a bad idea to go messing with it because all the stale old data
can come flooding back out and fill your code with stuck bits, and they can take
an awful long time to clean up again.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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