1.1 --- a/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Thu Nov 05 11:42:42 2015 +0100 1.2 +++ b/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Tue May 07 20:38:26 2019 +0000 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -1296,19 +1296,18 @@ 1.11 __ movl(Address(t, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD); 1.12 1.13 // If result was an oop then unbox and save it in the frame 1.14 - { Label L; 1.15 - Label no_oop, store_result; 1.16 + { 1.17 + Label no_oop; 1.18 ExternalAddress handler(AbstractInterpreter::result_handler(T_OBJECT)); 1.19 __ cmpptr(Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize), 1.20 handler.addr()); 1.21 __ jcc(Assembler::notEqual, no_oop); 1.22 __ cmpptr(Address(rsp, 0), (int32_t)NULL_WORD); 1.23 __ pop(ltos); 1.24 - __ testptr(rax, rax); 1.25 - __ jcc(Assembler::zero, store_result); 1.26 - // unbox 1.27 - __ movptr(rax, Address(rax, 0)); 1.28 - __ bind(store_result); 1.29 + // Unbox oop result, e.g. JNIHandles::resolve value. 1.30 + __ resolve_jobject(rax /* value */, 1.31 + thread /* thread */, 1.32 + t /* tmp */); 1.33 __ movptr(Address(rbp, (frame::interpreter_frame_oop_temp_offset)*wordSize), rax); 1.34 // keep stack depth as expected by pushing oop which will eventually be discarded 1.35 __ push(ltos);