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