From 74a2534a0332e66d81c9c368c0c5966ed91ad31f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 8 Jan 2010 16:41:57 +0000 Subject: [PATCH] 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 --- src/system/kernel/arch/x86/arch_x86.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/arch/x86/arch_x86.S b/src/system/kernel/arch/x86/arch_x86.S index cdef569067..a20257c03c 100644 --- a/src/system/kernel/arch/x86/arch_x86.S +++ b/src/system/kernel/arch/x86/arch_x86.S @@ -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