On Tue, Jan 22, 2008 at 11:02:44PM -0600, Gabriel Sechan wrote:

Only if you want to completely redefine the meaning of "general purpose".
A dedicated stack register is *not* general purpose.

But, you're not required to use it that way.  If you had a calling
convention that didn't use a stack, for example, you could use it as an
ordinary general purpose register.

The x86 has a few instructions that do _more_ things with esp than you can
do with other registers, but there aren't fewer things you can do with it.

And, there isn't anything special about ebp, just convention of ABIs.  I've
seen implementations of even stack based languages with very different
calling conventions do something very different with it, such as use it as
a pointer to a different stack, or a pointer to a global set of spill
registers.  This isn't real common, because most people want to be able to
call C code.

Dave

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to