Small optimization proposed by "Grey": We load USER_DATA_SEG into %ecx

anyway, so we can as well push the register later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34949 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-01-08 16:41:57 +00:00
parent d756fcf644
commit 74a2534a03

View File

@ -164,7 +164,7 @@ FUNCTION(x86_end_userspace_thread_exit):
FUNCTION(x86_enter_userspace):
movl 4(%esp), %eax // get entry point
movl 8(%esp), %ebx // get user stack
movw $USER_DATA_SEG, %cx
movl $USER_DATA_SEG, %ecx
movw %cx, %ds
movw %cx, %es
//movw $0x33 + cpu_num, %fs -> fs points to the TLS storage (CPU dependent segment)
@ -172,7 +172,7 @@ FUNCTION(x86_enter_userspace):
xorl %ebp, %ebp // this is the last stack frame - we don't need one on return
// (%ebp marks the beginning of this stack frame)
pushl $USER_DATA_SEG // user data segment
pushl %ecx // user data segment
pushl %ebx // user stack
pushl $(1 << 9) | 2 // user flags
pushl $USER_CODE_SEG // user code segment