src/cpu/x86/vm/templateInterpreter_x86_64.cpp

changeset 9669
32bc598624bd
parent 8877
f04097176542
child 9703
2fdf635bcf28
     1.1 --- a/src/cpu/x86/vm/templateInterpreter_x86_64.cpp	Thu Nov 05 11:42:42 2015 +0100
     1.2 +++ b/src/cpu/x86/vm/templateInterpreter_x86_64.cpp	Tue May 07 20:38:26 2019 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2003, 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 @@ -1272,16 +1272,16 @@
    1.11    // and result handler will pick it up
    1.12  
    1.13    {
    1.14 -    Label no_oop, store_result;
    1.15 +    Label no_oop;
    1.16      __ lea(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT)));
    1.17      __ cmpptr(t, Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize));
    1.18      __ jcc(Assembler::notEqual, no_oop);
    1.19      // retrieve result
    1.20      __ pop(ltos);
    1.21 -    __ testptr(rax, rax);
    1.22 -    __ jcc(Assembler::zero, store_result);
    1.23 -    __ movptr(rax, Address(rax, 0));
    1.24 -    __ bind(store_result);
    1.25 +    // Unbox oop result, e.g. JNIHandles::resolve value.
    1.26 +    __ resolve_jobject(rax /* value */,
    1.27 +                       r15_thread /* thread */,
    1.28 +                       t /* tmp */);
    1.29      __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset*wordSize), rax);
    1.30      // keep stack depth as expected by pushing oop which will eventually be discarde
    1.31      __ push(ltos);

mercurial