From e7981db3062010ea46a08b6b65439390ac7bc541 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Sun, 18 Jan 2015 18:25:06 +0000 Subject: [PATCH] Fix substitution macros for CMOVcc. git-svn-id: svn://kolibrios.org@5383 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/macros.inc | 49 ++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/programs/macros.inc b/programs/macros.inc index 568e6f5fab..8d800d0e5e 100644 --- a/programs/macros.inc +++ b/programs/macros.inc @@ -578,48 +578,55 @@ struct FILEINFO Size dq ? ends - -if __CPU_type eq p5 ; CMOVcc isnt supported on the P5 - cmove fix cmovz + macro cmovz reg1, reg2 { -local .jumpaddr - - jnz .jumpaddr +if __CPU_type eq p5 ; CMOVcc isnt supported on the P5 + jnz ..jumpaddr mov reg1, reg2 - .jumpaddr: + ..jumpaddr: +else + cmovz reg1, reg2 +end if + } cmovne fix cmovnz + macro cmovnz reg1, reg2 { -local .jumpaddr - - jz .jumpaddr +if __CPU_type eq p5 ; CMOVcc isnt supported on the P5 + jz ..jumpaddr mov reg1, reg2 - .jumpaddr: + ..jumpaddr: +else + cmovnz reg1, reg2 +end if + } macro cmovg reg1, reg2 { -local .jumpaddr - - jle .jumpaddr +if __CPU_type eq p5 ; CMOVcc isnt supported on the P5 + jle ..jumpaddr mov reg1, reg2 - .jumpaddr: + ..jumpaddr: +else + cmovg reg1, reg2 +end if } macro cmovl reg1, reg2 { -local .jumpaddr - - jge .jumpaddr +if __CPU_type eq p5 ; CMOVcc isnt supported on the P5 + jge ..jumpaddr mov reg1, reg2 - .jumpaddr: -} - + ..jumpaddr: +else + cmovl reg1, reg2 end if +} ; constants