lkml.org 
[lkml]   [2002]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Intel P6 vs P7 system call performance
Linus Torvalds wrote:

> ===== arch/i386/kernel/sysenter.c 1.1 vs edited =====
> --- 1.1/arch/i386/kernel/sysenter.c Mon Dec 16 21:39:04 2002
> +++ edited/arch/i386/kernel/sysenter.c Tue Dec 17 11:39:39 2002
> @@ -48,14 +48,14 @@
> 0xc3 /* ret */
> };
> static const char sysent[] = {
> - 0x55, /* push %ebp */
> 0x51, /* push %ecx */
> 0x52, /* push %edx */
> + 0x55, /* push %ebp */
> 0x89, 0xe5, /* movl %esp,%ebp */
> 0x0f, 0x34, /* sysenter */
> + 0x5d, /* pop %ebp */
> 0x5a, /* pop %edx */
> 0x59, /* pop %ecx */
> - 0x5d, /* pop %ebp */
> 0xc3 /* ret */

Instead of duplicating the push/pop %ebp just use the first one by using

movl 12(%ebo), %ebp

in the kernel code or remove the first. The later is better, smaller code.

--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:31    [from the cache]
©2003-2011 Jasper Spaans