>
>
> Why the switch_to() macro saves on the stack the values of
> ebx, esi and edi (ebp is used by gcc because of the
> -fno-omit-frame-pointer option) ?
>
> We tried the following patch (2.1.131) and it worked just fine.
[SNIPPED]
You are just lucky. EBX, EDI, ESI, and EBP must be saved across even
ordinary 'C' function calls! Ordinarily, gcc will save these at
the beginning of a procedure. However, switch_to() doesn't necessarily
go to the start of a procedure. -fno-omit-frame-pointer says to access
stack-variables off from EBP. -fomit-frame-pointer says to not bother
to set up a stack-frame using EBP. In any case, the value of EBP
is precious.
Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.131 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/