Re: 2.4 kernel & gcc code generation: a bug?

From: H. Peter Anvin (
Date: Wed Feb 07 2001 - 02:46:28 EST

Followup to: <3A8108F8.2476.21D0F5@localhost>
By author: "Ulrich Windl" <>
In newsgroup:
> You'll notice that %edx is not pushed at the start of the function.
> Unless the caller saves that, edx will be spilled. Depending on the
> level of optimization this can be bad. Am I wrong?

Yes. %eax, %edx and %ecx are defined as caller-saved registers. Each
function is free to clobber them at will.

Now, if you saw the same for %ebx, %ebp, %esi or %edi, that would be


<> at work, <> in private!
"Unix gives you enough rope to shoot yourself in the foot."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 21:00:26 EST