Re:One-pass Compiler
by userbinator on Saturday May 23, 2020 @06:43PM
(#23287247)
I remember some of the old DOS compilers would generate similar code, using the stack as an actual expression evaluation stack when registers weren't sufficient. It's not a bad idea even now, since x86 has an internal cache of the top of the stack so operations on it are specifically optimised, and the opcodes are very small: push/pop reg is 1 byte, push s8 is 2.
[ Parent
| on HN ]
There are no comments on this comment yet.