Browse Source

Fix the integer sign functions. Return 1 for values > 0 instead of 0.

cache-refactoring
Klaus Treichel 17 years ago
parent
commit
d559a193bd
  1. 3
      ChangeLog
  2. 4
      jit/jit-intrinsic.c

3
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.

4
jit/jit-intrinsic.c

@ -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
{

Loading…
Cancel
Save