i586 compatability macros (CMOVcc substitutes) for NET branch

git-svn-id: svn://kolibrios.org@1857 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2011-02-08 19:11:36 +00:00
parent 9d6354c990
commit ba8ddae0aa
2 changed files with 63 additions and 2 deletions

View File

@ -541,6 +541,24 @@ local .jumpaddr
.jumpaddr: .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:
}
end if end if
; constants ; constants

View File

@ -101,6 +101,49 @@ end if
macro Mov op1,op2,op3 ; op1 = op2 = op3 macro Mov op1,op2,op3 ; op1 = op2 = op3
{ {
mov op2,op3 mov op2,op3
mov op1,op2 mov op1,op2
} }
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:
}
end if