Added CMOVcc replacements to kernel macros (for eBox)

git-svn-id: svn://kolibrios.org@2866 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2012-07-13 13:29:28 +00:00
parent 7aeabda91e
commit 96f1dd834c
3 changed files with 83 additions and 3 deletions

View File

@ -117,3 +117,83 @@ macro list_del entry
mov [ecx+list_fd], edx
}
if __CPU_type eq p5 ; CMOVcc isnt supported on the P5
cmove fix cmovz
macro cmovz reg1, reg2 {
local .jumpaddr
jnz .jumpaddr
mov reg1, reg2
.jumpaddr:
}
cmovne fix cmovnz
macro cmovnz reg1, reg2 {
local .jumpaddr
jz .jumpaddr
mov reg1, reg2
.jumpaddr:
}
macro cmovg reg1, reg2 {
local .jumpaddr
jle .jumpaddr
mov reg1, reg2
.jumpaddr:
}
macro cmovl reg1, reg2 {
local .jumpaddr
jge .jumpaddr
mov reg1, reg2
.jumpaddr:
}
macro cmova reg1, reg2 {
local .jumpaddr
jbe .jumpaddr
mov reg1, reg2
.jumpaddr:
}
macro cmovb reg1, reg2 {
local .jumpaddr
jae .jumpaddr
mov reg1, reg2
.jumpaddr:
}
macro cmovae reg1, reg2 {
local .jumpaddr
jb .jumpaddr
mov reg1, reg2
.jumpaddr:
}
macro cmovbe reg1, reg2 {
local .jumpaddr
ja .jumpaddr
mov reg1, reg2
.jumpaddr:
}
end if

View File

@ -134,7 +134,7 @@ include 'tcp_output.inc'
;
; TCP_API
;
; This function is called by system function 75
; This function is called by system function 76
;
; IN: subfunction number in bl
; device number in bh

View File

@ -966,7 +966,7 @@ align 4
mov eax, [ebx + TCP_SOCKET.SND_WND]
cmp eax, [ebx + TCP_SOCKET.SND_CWND]
cmovg eax, [ebx + TCP_SOCKET.SND_CWND]
cmova eax, [ebx + TCP_SOCKET.SND_CWND]
shr eax, 1
push edx
xor edx, edx
@ -1108,7 +1108,7 @@ align 4
pop ecx
cmp esi, eax
cmovg esi, eax
cmova esi, eax
mov [ebx + TCP_SOCKET.SND_CWND], esi