How can a CPU not support a stack? Doesn't any architecture that uses subroutines (I'm pretty sure that's all architectures) have to push the return address onto the stack so it can return to where it called the subroutine from? The stack just means a section of memory with a pointer that grows in a certain direction and acts as a stack data structure no? I just don't understand how an architecture could not support a stack.
To what extent is automatic memory storage (automatic variables vs. static variables) determined by the compiler vs. the hardware architecture?
No comments:
Post a Comment