CALL_USED_REGISTERS help

Paulo J. Matos pocmatos@gmail.com
Fri Dec 18 10:50:00 GMT 2009


Hi,

I am reading the documentation of CALL_USED_REGISTERS and can't help
but thing there is a typo (even though it is more probable that I am
not understanding the documentation).
It says:
"Like FIXED_REGISTERS but has 1 for each register that is clobbered
(in general) by function calls as well as for fixed registers. ... If
a register has 0 in CALL_USED_REGISTERS, the compiler automatically
saves it on function entry and restores it on function exit, if the
register is used within the function. "

Is it has a 1, then it means that the register is clobbered. And 0
means it is not clobbered. But if it is not clobbered, why does the
compiler need to save it on function entry and restore it on function
exit?
I am not getting it...

Thanks,

-- 
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net



More information about the Gcc-help mailing list