This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static long minusOneIfNotLongMax(long value) { | |
final long valueMinusOne = value - 1; | |
final long diffFromValue = value - Long.MAX_VALUE; | |
final long tmp = (diffFromValue - 1) >> 63; | |
final long mask = ((diffFromValue >> 63) ^ tmp) & tmp; | |
return (value & mask) | (valueMinusOne & (~mask)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You will need Mercurial; get it with `brew install hg`. | |
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u | |
cd jdk8u | |
hg update jdk8u92-b14 | |
chmod +x ./get_source.sh; ./get_source.sh | |
cd hotspot/src/share/tools/hsdis | |
wget http://ftp.heanet.ie/mirrors/gnu/binutils/binutils-2.26.tar.gz | |
tar -xzf binutils-2.26.tar.gz | |
make BINUTILS=binutils-2.26 ARCH=amd64 |