--- old/src/cpu/x86/vm/macroAssembler_x86.cpp 2017-02-23 13:57:10.553871135 +0100 +++ new/src/cpu/x86/vm/macroAssembler_x86.cpp 2017-02-23 13:57:10.453872120 +0100 @@ -5159,6 +5159,13 @@ bind(done); } +void MacroAssembler::clear_jweak_tag(Register possibly_jweak) { + const int32_t inverted_jweak_mask = ~static_cast(JNIHandles::weak_tag_mask); + STATIC_ASSERT(inverted_jweak_mask == -2); // otherwise check this code + // The inverted mask is sign-extended + andptr(possibly_jweak, inverted_jweak_mask); +} + ////////////////////////////////////////////////////////////////////////////////// #if INCLUDE_ALL_GCS