By: Jörn Engel (joern.delete@this.purestorage.com), May 17, 2021 11:39 am
Room: Moderated Discussions
I have trouble explaining why those instructions even exist. If I was designing a CPU/ABI, I would have the stack pointer point to a stack frame and only read/write relative to that frame. Instead we seem to have both a stack pointer and a frame pointer. Or we can choose to compile without frame pointer, but now have trouble walking the stack.
So there is an obvious benefit to the frame pointer. But the only benefit to having an additional stack pointer seems to be that you can use push/pop instructions. Are they really that beneficial, compared to a move relative to frame pointer? Or are we simply stuck with historical mistakes and nobody wants to create a new ABI to fix those mistakes?
So there is an obvious benefit to the frame pointer. But the only benefit to having an additional stack pointer seems to be that you can use push/pop instructions. Are they really that beneficial, compared to a move relative to frame pointer? Or are we simply stuck with historical mistakes and nobody wants to create a new ABI to fix those mistakes?