src/cpu/x86/vm/sharedRuntime_x86_32.cpp

changeset 2552
638119ce7cfd
parent 2497
3582bf76420e
child 2687
3d58a4983660
     1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Mon Jan 31 17:48:21 2011 -0800
     1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Tue Feb 01 03:38:44 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2003, 2011, 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 @@ -660,25 +660,6 @@
    1.11                              int comp_args_on_stack,
    1.12                              const BasicType *sig_bt,
    1.13                              const VMRegPair *regs) {
    1.14 -  // we're being called from the interpreter but need to find the
    1.15 -  // compiled return entry point.  The return address on the stack
    1.16 -  // should point at it and we just need to pull the old value out.
    1.17 -  // load up the pointer to the compiled return entry point and
    1.18 -  // rewrite our return pc. The code is arranged like so:
    1.19 -  //
    1.20 -  // .word Interpreter::return_sentinel
    1.21 -  // .word address_of_compiled_return_point
    1.22 -  // return_entry_point: blah_blah_blah
    1.23 -  //
    1.24 -  // So we can find the appropriate return point by loading up the word
    1.25 -  // just prior to the current return address we have on the stack.
    1.26 -  //
    1.27 -  // We will only enter here from an interpreted frame and never from after
    1.28 -  // passing thru a c2i. Azul allowed this but we do not. If we lose the
    1.29 -  // race and use a c2i we will remain interpreted for the race loser(s).
    1.30 -  // This removes all sorts of headaches on the x86 side and also eliminates
    1.31 -  // the possibility of having c2i -> i2c -> c2i -> ... endless transitions.
    1.32 -
    1.33  
    1.34    // Note: rsi contains the senderSP on entry. We must preserve it since
    1.35    // we may do a i2c -> c2i transition if we lose a race where compiled
    1.36 @@ -687,40 +668,6 @@
    1.37    // Pick up the return address
    1.38    __ movptr(rax, Address(rsp, 0));
    1.39  
    1.40 -  // If UseSSE >= 2 then no cleanup is needed on the return to the
    1.41 -  // interpreter so skip fixing up the return entry point unless
    1.42 -  // VerifyFPU is enabled.
    1.43 -  if (UseSSE < 2 || VerifyFPU) {
    1.44 -    Label skip, chk_int;
    1.45 -    // If we were called from the call stub we need to do a little bit different
    1.46 -    // cleanup than if the interpreter returned to the call stub.
    1.47 -
    1.48 -    ExternalAddress stub_return_address(StubRoutines::_call_stub_return_address);
    1.49 -    __ cmpptr(rax, stub_return_address.addr());
    1.50 -    __ jcc(Assembler::notEqual, chk_int);
    1.51 -    assert(StubRoutines::x86::get_call_stub_compiled_return() != NULL, "must be set");
    1.52 -    __ lea(rax, ExternalAddress(StubRoutines::x86::get_call_stub_compiled_return()));
    1.53 -    __ jmp(skip);
    1.54 -
    1.55 -    // It must be the interpreter since we never get here via a c2i (unlike Azul)
    1.56 -
    1.57 -    __ bind(chk_int);
    1.58 -#ifdef ASSERT
    1.59 -    {
    1.60 -      Label ok;
    1.61 -      __ cmpl(Address(rax, -2*wordSize), Interpreter::return_sentinel);
    1.62 -      __ jcc(Assembler::equal, ok);
    1.63 -      __ int3();
    1.64 -      __ bind(ok);
    1.65 -    }
    1.66 -#endif // ASSERT
    1.67 -    __ movptr(rax, Address(rax, -wordSize));
    1.68 -    __ bind(skip);
    1.69 -  }
    1.70 -
    1.71 -  // rax, now contains the compiled return entry point which will do an
    1.72 -  // cleanup needed for the return from compiled to interpreted.
    1.73 -
    1.74    // Must preserve original SP for loading incoming arguments because
    1.75    // we need to align the outgoing SP for compiled code.
    1.76    __ movptr(rdi, rsp);

mercurial