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

View File

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