From: Alex <akhripin@mit.edu>
To: linux-kernel@vger.kernel.org
Subject: Slight optimizations to entry.S patch
Date: Thu, 20 Dec 2001 17:32:21 -0500 [thread overview]
Message-ID: <20011220223221.GA17913@morgoth.mit.edu> (raw)
Hi,
I was familiarizing (or trying to) myself with the i386 architecture code,
and saw a few possible optimizations. I think they can save a few cycles (not
that many). Can someone comment? Are the changes worthwhile?
-Alex K.
--- entry.S.orig Thu Dec 20 16:57:39 2001
+++ entry.S Thu Dec 20 17:20:29 2001
@@ -91,9 +91,9 @@
pushl %edi; \
pushl %esi; \
pushl %edx; \
+ movl $(__KERNEL_DS),%edx; \
pushl %ecx; \
pushl %ebx; \
- movl $(__KERNEL_DS),%edx; \
movl %edx,%ds; \
movl %edx,%es;
@@ -141,13 +141,13 @@
movl EFLAGS(%esp),%ecx # and this is cs..
movl %eax,EFLAGS(%esp) #
movl %edx,EIP(%esp) # Now we move them to their "normal" places
- movl %ecx,CS(%esp) #
movl %esp,%ebx
+ movl %ecx,CS(%esp) #
pushl %ebx
andl $-8192,%ebx # GET_CURRENT
movl exec_domain(%ebx),%edx # Get the execution domain
- movl 4(%edx),%edx # Get the lcall7 handler for the domain
pushl $0x7
+ movl 4(%edx),%edx # Get the lcall7 handler for the domain
call *%edx
addl $4, %esp
popl %eax
@@ -162,13 +162,13 @@
movl EFLAGS(%esp),%ecx # and this is cs..
movl %eax,EFLAGS(%esp) #
movl %edx,EIP(%esp) # Now we move them to their "normal" places
- movl %ecx,CS(%esp) #
movl %esp,%ebx
+ movl %ecx,CS(%esp) #
pushl %ebx
andl $-8192,%ebx # GET_CURRENT
movl exec_domain(%ebx),%edx # Get the execution domain
- movl 4(%edx),%edx # Get the lcall7 handler for the domain
pushl $0x27
+ movl 4(%edx),%edx # Get the lcall7 handler for the domain
call *%edx
addl $4, %esp
popl %eax
next reply other threads:[~2001-12-20 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-20 22:32 Alex [this message]
2001-12-20 22:47 ` Slight optimizations to entry.S patch Davide Libenzi
2001-12-20 23:55 ` Robert Love
2001-12-21 16:49 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011220223221.GA17913@morgoth.mit.edu \
--to=akhripin@mit.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox