Re: _syscall2 in PIC code on ix86

From: H. Peter Anvin (hpa@transmeta.com)
Date: Tue Jan 18 2000 - 02:49:02 EST


Jakub Jelinek wrote:
> >
> > Does syscall() produce proper inline code?
>
> syscall() is an external function in glibc, not an inline.
> And it saves all needed registers around it.
> In fact, I don't see what you need inline syscall macro for outside of the
> kernel actually. Performance critical syscalls are in libc, the rest (like
> create_module) really can waste 10 additional instructions.
>

"I don't need it, therefore you don't either." Sorry, that's a bogus
argument.

>
> BTW: IMHO it is a bad idea to create _syscall_pic as new macros because on
> most archs it will be the same. Instead, one should use
> #ifdef __pic__
> #else
> #endif
> in the definitions. __pic__ is defined by the compiler if you compile
> -fpic/-fPIC on i386, sparc, maybe others.
>

That is, indeed, a much better idea.

        -hpa

-
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/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:17 EST