On Tue, Jan 22, 2008 at 06:03:56PM -0800, [EMAIL PROTECTED] wrote:
On Tue, Jan 22, 2008 at 03:24:01PM -0800, SJS wrote:
When did x86 and ARM CPUs get a stack on the CPU?

The assembly includes instructions for a stack.  I don't know details of where
or how the stack is implemented.

ARM doesn't have stack instructions, you just think it does :-)

The load-multiple and store-multiple instructions have bits indicating
pre/post increment/decrement (yes, all for possitilities), and another bit
that indicates whether the adjusted offset should be written back to the
register.  You can use it like a stack, but you can use it for a lot of
other things.

Calling conventions on ARM use a certain register as a stack pointer, but
there isn't anything special about that register.

x86 does have special instructions that implicitly use the stack-pointer
register, but it is still just an indexing addressing mode.  It is very
different than a stack-based process.

In a stack process, you don't have any registers, just the stack.  Ok, you
might get an accumulator.

Dave

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

Reply via email to