This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CALL_USED_REGISTERS help


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]