From acdbe274f994d32ab26e4b94f14aaae748c8ae65 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 3 Oct 2007 22:26:42 -0700 Subject: [PATCH] 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 --- vvp/vthread.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vvp/vthread.cc b/vvp/vthread.cc index 1e8707684..d7aa74cd6 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -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))