]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
Fix the integer sign functions. Return 1 for values > 0 instead of 0.
authorKlaus Treichel <ktreichel@web.de>
Sun, 30 Mar 2008 16:05:57 +0000 (16:05 +0000)
committerKlaus Treichel <ktreichel@web.de>
Sun, 30 Mar 2008 16:05:57 +0000 (16:05 +0000)
ChangeLog
jit/jit-intrinsic.c

index 7a4ef98cec3f063c7c4b60e781af4bdade742a8e..a76d98a95323f7fd3050de699ed91492603ac307 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
        * jit/jit-gen-x86-64.h: Add macros for the test, imul, cdw/cdq/cqo
        and cmov instructions.
 
+       * jit/jit-intrinsic.c (jit_int_sign, jit_long_sign): Return 1 for
+       values greater than 0 instead of 0.
+
        * jit/jit-rules-x84-64.ins: Add IMUL, IDIV, IDIV_UN, IREM, IREM_UN,
        LMUL, LDIV, LDIV_UN, LREM and LREM_UN opcodes. Replace the compares
        with zero done with or with test instructions.
index b23b4085dfa1e8394716796957c6465d47308404..06d63c10ad1338e91076144b02f401bdf7940277 100644 (file)
@@ -349,7 +349,7 @@ jit_int jit_int_sign(jit_int value1)
        }
        else if(value1 > 0)
        {
-               return 0;
+               return 1;
        }
        else
        {
@@ -876,7 +876,7 @@ jit_int jit_long_sign(jit_long value1)
        }
        else if(value1 > 0)
        {
-               return 0;
+               return 1;
        }
        else
        {