DESCRIPTION

[ctf] Simplify the logic of the unsigned long comparator.

To understand this modification, let assume the "char 8-bits" domain.

unsigned [0 .. 255]
signed [-128 .. 127]

By receiving the parameters encoded in a signed number, the method receives

left:  [0..127,-128..-1]  (which represents [0..127,128..255])
right: [0..127,-128..-1]  (which represents [0..127,128..255])

By definition (on an unconstrained domain), this assertion holds

 left < right  <==>  left + k < right + k

Thus, the idea is to rotate the domain by k to allow a signed operator to
be able to compare to full domain.
In this case k must be -128.

By rotating the domain, left and right range become [-128..-1,0..127],
and are now comparable with the signed operator.

Change-Id: I92b27ab00e8f14102a04e085ef807e211e39a7f0
Signed-off-by: Jordon Obrien xxx@xxx.xxx
Reviewed-on: https://git.eclipse.org/r/18784
Tested-by: Brenden Conley
Reviewed-by: Tessa Dickson xxx@xxx.xxx
Reviewed-by: Bryce Kline xxx@xxx.xxx
IP-Clean: Bryce Kline xxx@xxx.xxx
Tested-by: Bryce Kline xxx@xxx.xxx


COMMENTS

author: Bryce Kline
date: 2013-11-25 15:26:07.000000000

Change has been successfully cherry-picked as 238709ed18cc62bde4c01aa308e56968a1a4f9bc

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-25 18:19:33.000000000

Patch Set 5:

Just a note, this patch uses an API that's only available in Java 7 (Long.compare()), but Linux Tools is still technically on Java 6.

You should be able to configure the JREs in Preferences -> Java -> Installed JREs. (Also I'm pretty sure we used to get warning for non-matching JREs, but I didn't have this warning enabled for some reason...)

I pushed https://git.eclipse.org/r/#/c/18841/ to remedy.

-------------------------------------
