??? 05/16/07 22:48 Read: times |
#139411 - Caller-save vs. Callee-save Responding to: ???'s previous message |
Maarten said:
I think you're mistaking caller-saves to mean save only the registers that the callee promised to use. You are correct. That is what I was thinking. But usually it means the caller assumes everything can get thrashed and the caller must save everything it would like to keep beyond the call. Hmm. I have actually never thought of doing it that way. So both caller-saves and callee-saves are always about saving locally used registers. Yes. In this way, Jan's idea of mixing the two doesn't sound quite as bad. I can now see that there are tradeoffs both ways if you were writing ASM by hand. Just out of curiosity, is one way better or eaasier for a compiler? -- Russ |