Fix signed ocmpare of negative numbers.

signed compare in proceedural code was comparing the absolute
value if both operands were negative. Wrong!

Signed-off-by: Stephen Williams <steve@icarus.com>
This commit is contained in:
Stephen Williams 2007-10-03 22:26:42 -07:00
parent 5d750b7779
commit acdbe274f9
1 changed files with 0 additions and 6 deletions

View File

@ -867,12 +867,6 @@ bool of_CMPS(vthread_t thr, vvp_code_t cp)
/* Correct the lt bit to account for the sign of the parameters. */
if (lt != BIT4_X) {
/* If both numbers are negative (and not equal) then
switch the direction of the lt. */
if ((sig1 == BIT4_1) && (sig2 == BIT4_1) && (eq != BIT4_1))
lt = ~lt;
/* If the first is negative and the last positive, then
a < b for certain. */
if ((sig1 == BIT4_1) && (sig2 == BIT4_0))