3 ms·
I'm actually working on a Pascal compiler right now. Register management has been a really tricky part for me, but I didn't even thing of treating an x86 proces
by jjice 6y ago
I'm actually working on a Pascal compiler right now. Register management has been a really tricky part for me, but I didn't even thing of treating an x86 processor as a stack based machine. Very clever, especially when you just want a simple compiler an not anything super optimized.
- lebuffon 6y agoA simple optimization is to make a stack machine with the top of stack cached in a register. This can improve speed about 10% in general operation.