Mercurial > hg > truffle
comparison graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/UnsignedMath.java @ 7530:5e3d1a68664e
applied mx eclipseformat to all Java files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 23 Jan 2013 16:34:57 +0100 |
parents | 2912b72d840a |
children |
comparison
equal
deleted
inserted
replaced
7529:4a11124a3563 | 7530:5e3d1a68664e |
---|---|
25 import java.math.*; | 25 import java.math.*; |
26 | 26 |
27 //JaCoCo Exclude | 27 //JaCoCo Exclude |
28 | 28 |
29 /** | 29 /** |
30 * Utilities for unsigned comparisons. | 30 * Utilities for unsigned comparisons. All methods have correct, but slow, standard Java |
31 * All methods have correct, but slow, standard Java implementations so that | 31 * implementations so that they can be used with compilers not supporting the intrinsics. |
32 * they can be used with compilers not supporting the intrinsics. | |
33 */ | 32 */ |
34 public class UnsignedMath { | 33 public class UnsignedMath { |
34 | |
35 private static final long MASK = 0xffffffffL; | 35 private static final long MASK = 0xffffffffL; |
36 | 36 |
37 /** | 37 /** |
38 * Unsigned comparison aboveThan for two numbers. | 38 * Unsigned comparison aboveThan for two numbers. |
39 */ | 39 */ |
120 | 120 |
121 private static BigInteger bi(long unsigned) { | 121 private static BigInteger bi(long unsigned) { |
122 return unsigned >= 0 ? BigInteger.valueOf(unsigned) : BigInteger.valueOf(unsigned & 0x7fffffffffffffffL).setBit(63); | 122 return unsigned >= 0 ? BigInteger.valueOf(unsigned) : BigInteger.valueOf(unsigned & 0x7fffffffffffffffL).setBit(63); |
123 } | 123 } |
124 } | 124 } |
125 |