This is the mail archive of the
mailing list for the GCC project.
Re: does gcc remember register values through into functions?
- From: "Marcel Cox" <cimetmc at myrealbox dot com>
- To: "Lin Gu" <lingushanghai at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 15 Jan 2005 10:59:19 +0100
- Subject: Re: does gcc remember register values through into functions?
- References: <firstname.lastname@example.org>
- Reply-to: "Marcel Cox" <>
> 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
Marcel Cox (using XanaNews 188.8.131.52)