Mail Archives: djgpp/1996/12/12/19:26:13
On 11 Dec 1996 10:42:16 GMT beppu AT rigel DOT oac DOT uci DOT edu (John Beppu) writes:
>In article <58jcu5$l6b AT leporello DOT cs DOT unibo DOT it>,
>Nicola Gaggi <gaggi AT cs DOT unibo DOT it> wrote:
>
>>John Beppu (beppu AT rigel DOT oac DOT uci DOT edu) wrote:
>>
>>: When linking a function written in assembly, which
>>: registers should be preserved? I think ebp should,
>>: but are there any others?
>>
>>
>>Hello,
>>
>>The answer is simple, every register your function clobbers excluding
>AX
>
>
> Damn. I didn't want to see that. When I dump the assembler output
> of a function written in C, it doesn't look as if it preserves every
> register it uses.
Is that with or without optimization?
GCC sometimes tries to avoid pushes and pops by 'remembering' what's in
which registers, and leaving them alone if the contents are needed later.
- Raw text -