Messages in this thread |  | | | Subject | Re: 2.3.30pre1 syscall w/6 args support? | | From | Ulrich Drepper <> | | Date | 07 Dec 1999 18:06:37 -0800 |
| |
Linus Torvalds <torvalds@transmeta.com> writes:
> In fact, I would argue that the proper way to handle this is: > > - no sysenter capability on the CPU: use "int 0x80": > > magic_address: > movl 4(%esp),%ebx > movl 8(%esp),%ecx > movl 12(%esp),%edx > movl 16(%esp),%esi > movl 20(%esp),%edi > movl 24(%esp),%ebp > int $0x80 > ret
I don't like this at all and it is really unnecessary.
First, it's easy enough to recompile glibc if there is a new calling convention. One only has to change one definition in the sources and recompile.
And second, mentioning the sources, take a look at sysdeps/unix/sysv/linux/i386/sysdep.h. The macros to create the syscall code goes to great length to generate optimal code. I.e., no additional arguments pushed etc.
IF/When sysenter comes it's easy enough to provide an alternative sysdep.h version which has the definition for the processors which support them. You can even have libraries with and without this system call mechanism installed at the same time (e.g., when the directory is exported via NFS) and the ld.so will pick the right one.
You are only wasting cycles without gaining anything which is not possible otherwise as well.
-- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Cygnus Solutions `--' drepper at cygnus.com `------------------------ - 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/
|  |