Re: Don't save registers during system calls

H. Peter Anvin (hpa@transmeta.com)
17 Apr 1998 10:29:00 GMT


Followup to: <vyz3efc7p8t.fsf@issan.informatik.uni-dortmund.de>
By author: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
In newsgroup: linux.dev.kernel
>
> FWIW, the m68k port already essentially does this. On kernel entry it
> only saves the registers that are call-clobbered in C (plus the registers
> that contain the syscall arguments so that they can be accessed through
> the normal C argument passing), the rest are only implicitly saved in the
> normal stack frames and during context switch. Since the m68k has many
> more registers than the ix86 this is a real win.
>

That's not quite what he's proposing. You're just doing the same
thing, it's just that the saves are later. I think he was proposing
that the kernel use a smaller (clobbered) register set than user space
would, hence (hopefully) not needing to save and restore some of the
registers at all. Since the Alpha has many more registers than the
m68k, this might be a win, too.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu