hotspot Udiff src/cpu/x86/vm/templateInterpreterGenerator_x86.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.
@@ -1191,18 +1191,36 @@
// If result is an oop unbox and store it in frame where gc will see it // and result handler will pick it up
{
- Label no_oop, store_result;
- Label no_oop, not_weak, store_result; __ lea(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmpptr(t, Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize)); __ jcc(Assembler::notEqual, no_oop); // retrieve result __ pop(ltos);
- // Unbox oop result, e.g. JNIHandles::resolve value. __ testptr(rax, rax);
- __ jcc(Assembler::zero, store_result);
- __ jcc(Assembler::zero, store_result); // 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));
+#if INCLUDE_ALL_GCS
- if (UseG1GC) {
__ g1_write_barrier_pre(noreg /* obj */,
rax /* pre_val */,
thread /* thread */,
t /* tmp */,
true /* tosca_live */,
true /* expand_call */);
- }
+#endif // INCLUDE_ALL_GCS
- __ jmp(store_result);
- __ bind(not_weak);
- // Resolve (untagged) jobject. __ movptr(rax, Address(rax, 0)); __ bind(store_result); __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset*wordSize), rax); // keep stack depth as expected by pushing oop which will eventually be discarded __ push(ltos);