Subject: Kernel calls - args in registers
To: Bill Sommerfeld <firstname.lastname@example.org>
From: Travis Hassloch x231 <travis@EvTech.com>
Date: 11/19/1996 15:06:53
In message <199610231240.MAA05218@orchard.medford.ma.us> you write:
> of course, if you're going to pass syscall arguments in registers (and
> do the syscall.c-equivalent in hand-massaged assembler) you might find
> that you'll get a bigger *system* performance gain (at least on "CISC"
> systems like the i386 and m68k) by using a more RISC-like calling
> convention with the first few arguments in registers..
I've been looking at this a bit lately, and noticed that, as you
point out, gcc doesn't use registers on the x86 by default (IMHO it should
have, at least if you can configure that for free Unixes -- it's not like we
had a historical baggage commercial compiler to be call-level compatible
One thing I thought might make a worthwhile gain is to make all
intrakernel calls use registers -- and if possible, all kernel calls.
Obviously this would require rewriting a bit of the system call
dispatch code. The next obvious step would be to change the
system call structure so that copying a stack around wasn't necessary
on most system calls.
I'm thinking it may screw up LKMs, possibly other things;
someone a bit more experienced could probably run through
the implications better than I.
CC'ed to tech-kern and hackers.