3 ms·
> There are push and pop instructions which are perfectly suited to this nested value use. In the past, lamenting how many compilers don't seem to realise that
by sebastianmestre 3y ago
> There are push and pop instructions which are perfectly suited to this nested value use. In the past, lamenting how many compilers don't seem to realise that (and the fact that push/pop are specially optimised on x86 via hardware known as the stack engine)
That's fair, but in the article I also store local variables relative to %rsp, so I wouldn't want it changing at all
I could use %rbp for that instead, but then I'd have to explain it in the article :^)
- userbinator 3y agoThat's fair, but in the article I also store local variables relative to %rsp, so I wouldn't want it changing at all You only need to keep track of how much you've put on the stack (which can be a single counter) and adjust the offsets appropriately. But then you'd have to explain that too...