hotspot Udiff src/cpu/x86/vm/sharedRuntime_x86_64.cpp (original) (raw)
rev 12543 : imported patch x86 rev 12553 : imported patch always_tag_x86
@@ -1,7 +1,7 @@ /*
- Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
- Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.
@@ -2577,18 +2577,36 @@ restore_native_result(masm, ret_type, stack_slots); }
__ reset_last_Java_frame(false);
- // Unpack oop result
- // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
Label L;
- Label done, not_weak; __ testptr(rax, rax);
__ jcc(Assembler::zero, L);
- __ jcc(Assembler::zero, done); // Use NULL as-is.
- __ testptr(rax, JNIHandles::weak_tag_mask); // Test for jweak tag.
- __ jcc(Assembler::zero, not_weak);
- // Resolve jweak.
- __ movptr(rax, Address(rax, -JNIHandles::weak_tag_value));
- __ verify_oop(rax);
+#if INCLUDE_ALL_GCS
- if (UseG1GC) {
__ g1_write_barrier_pre(noreg /* obj */,
rax /* pre_val */,
r15_thread /* thread */,
rcx /* tmp */,
true /* tosca_live */,
true /* expand_call */);
- }
+#endif // INCLUDE_ALL_GCS
- __ jmp(done);
- __ bind(not_weak);
- // Resolve (untagged) jobject. __ movptr(rax, Address(rax, 0));
__ bind(L); __ verify_oop(rax);
- __ bind(done);
}
if (CheckJNICalls) { // clear_pending_jni_exception_check __ movptr(Address(r15_thread, JavaThread::pending_jni_exception_check_fn_offset()), NULL_WORD);