patternMinor
Why do modern processors need a runtime stack?
Viewed 0 times
whystackneedprocessorsruntimemodern
Problem
Professor said that modern processor needs runtime stack.
But he didn't explain the reason.
Why is the runtime stack required in the modern processors?
But he didn't explain the reason.
Why is the runtime stack required in the modern processors?
Solution
I would say that "required" is a bit of strong word. Processors provide hardware support for stacks to help implement the call stack abstraction. Having special instructions to do so can improve performance. Note however that some processors like ARM (except in Thumb mode) do not really have special instruction to do so, the ldm/stm instructions with pre/post inc/dec are flexible enough to do so.
Context
StackExchange Computer Science Q#82792, answer score: 6
Revisions (0)
No revisions yet.