deleted cross order of registers in functions 41,42

some optimizations of them

*because revision 741 is broken, I tested it on revision 724

git-svn-id: svn://kolibrios.org@742 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Rus 2008-02-17 13:31:28 +00:00
parent a24875d50b
commit b27b500a57
2 changed files with 2008 additions and 2008 deletions

View File

@ -144,8 +144,8 @@ iglobal
dd syscall_drawline ; 38-DrawLine
dd sys_getbackground ; 39-GetBackgroundSize,ReadBgrData,.
dd 0
dd syscall_getirqowner ; 41-GetIrqOwner
dd get_irq_data ; 42-ReadIrqData
dd 0
dd ; 42-ReadIrqData
dd sys_outport ; 43-SendDeviceData
dd sys_programirq ; 44-ProgramIrqs
dd reserve_free_irq ; 45-ReserveIrq and FreeIrq
@ -224,8 +224,8 @@ iglobal
dd cross_order ; 38-DrawLine
dd cross_order ; 39-GetBackgroundSize,ReadBgrData,.
dd set_app_param ; 40-WantEvents
dd cross_order ; 41-GetIrqOwner
dd cross_order ; 42-ReadIrqData
dd syscall_getirqowner ; 41-GetIrqOwner
dd get_irq_data ; 42-ReadIrqData
dd cross_order ; 43-SendDeviceData
dd cross_order ; 44-ProgramIrqs
dd cross_order ; 45-ReserveIrq and FreeIrq

View File

@ -3934,45 +3934,44 @@ sys_programirq:
align 4
get_irq_data:
cmp eax,16
cmp ebx,16
jae .not_owner
mov edx,eax ; check for correct owner
shl edx,2
add edx,irq_owner
mov edx,[edx]
mov eax, [4 * ebx + irq_owner]
mov edi,[TASK_BASE]
mov edi,[edi+TASKDATA.pid]
cmp edx,edi
cmp eax,[edi+TASKDATA.pid]
je gidril1
.not_owner:
mov [esp+32],dword 2 ; ecx=2
mov [esp+28],dword 2 ; ecx=2
ret
gidril1:
mov ebx,eax
shl ebx,12
add ebx,IRQ_SAVE
mov eax,[ebx]
mov ecx,1
test eax,eax
lea eax,[ebx + IRQ_SAVE + 0x10]
mov edx,[eax - 0x10]
test edx,edx
jz gid1
dec eax
mov esi,ebx
mov [ebx],eax
movzx ebx,byte [ebx+0x10]
add esi,0x10
mov edi,esi
dec dword [eax - 0x10]
movzx ebx,byte [eax]
mov edi, eax
xchg esi, eax
inc esi
mov ecx,4000 / 4
cld
rep movsd
; xor ecx,ecx ; as result of 'rep' ecx=0
dec edx
gid1:
mov [esp+36],eax
mov [esp+32],ecx
mov [esp+24],ebx
mov [esp+32],edx
mov [esp+28],ecx
mov [esp+20],ebx
ret
@ -5103,15 +5102,16 @@ syscall_drawline: ; DrawLine
align 4
syscall_getirqowner: ; GetIrqOwner
cmp eax,16
cmp ebx,16
jae .err
shl eax,2
add eax,irq_owner
mov eax,[eax]
mov [esp+36],eax
mov eax,[4 * ebx + irq_owner]
mov [esp+32],eax
ret
.err:
or dword [esp+36], -1
or dword [esp+32], -1
ret
align 4