3 ms·
As I reread that passage now, there's some redundancy in my prose. The first time I mention CSE I'm talking specifically about optimization and the need to avoi
by akkartik 7y ago
As I reread that passage now, there's some redundancy in my prose. The first time I mention CSE I'm talking specifically about optimization and the need to avoid the temptation to build an optimizer over time. The second time I don't, but I'm still implicitly assuming the need to optimize. I should clean that up.
Calling convention: yes, all registers are callee-saved. Multiple values can be returned. (Up to 6, I guess?) Since the callee saves registers, any returned registers are just not saved and restored. A function can return in any register, though I use `eax` by convention. Since miscommunication between caller and callee about what registers are clobbered can lead to subtle bugs, I require the caller to also show the correct register being written to. Does that help? I'll work this in. Thanks!
- tom_mellior 7y agoYes, that's great, thanks!