OK. I think this change addresses all of your points. http://cr.openjdk.java.net/~aph/8145096-3 The complex (and incorrect) ((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) - CONST64(1); is merely a difficult way to write jlong((~ UCONST64(0)) >> con) Andrew.