This is the mail archive of the gcc@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]

Re: does gcc remember register values through into functions?


> My guess is that gcc does not assume specific values in
> any registers, except for registers that carry parameters
> and serve as stack pointer, when it enters a function. But
> I hope to be sure about this. Any hints and suggestions
> would be appreciated.

Well, that not quite the case. It's actually the platform's ABI that
determines what happens to the various registers. Most ABIs specify
that functions can only destroy certain registers while for others,
their original value has to be saved if the function modifies the
register.

-- 
Marcel Cox (using XanaNews 1.17.1.2)


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