From e94cdff57f8beb88fe8be09c9ca4fee042d3f803 Mon Sep 17 00:00:00 2001 From: pathoswithin Date: Wed, 2 Dec 2015 09:38:32 +0000 Subject: [PATCH] added macro "cmp" git-svn-id: svn://kolibrios.org@5941 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/macros.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/programs/macros.inc b/programs/macros.inc index b0d1452d06..21c5ec635f 100644 --- a/programs/macros.inc +++ b/programs/macros.inc @@ -398,6 +398,19 @@ macro diff10 title,l1,l2 ; optimize the code for size __regs fix +macro cmp arg1,arg2 +{ + if (arg1 in __regs) & (arg2 eqtype 0) + if (arg2) = 0 + test arg1,arg1 + else + cmp arg1,arg2 + end if + else + cmp arg1,arg2 + end if +} + macro add arg1,arg2 { if (arg2 eqtype 0)