Tue, 24 Dec 2013 11:48:39 -0800
8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
Summary: Copyright year updated for files modified during 2013
Reviewed-by: twisti, iveresov
never@1445 | 1 | /* |
stefank@2314 | 2 | * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. |
never@1445 | 3 | * Copyright 2008 Red Hat, Inc. |
never@1445 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
never@1445 | 5 | * |
never@1445 | 6 | * This code is free software; you can redistribute it and/or modify it |
never@1445 | 7 | * under the terms of the GNU General Public License version 2 only, as |
never@1445 | 8 | * published by the Free Software Foundation. |
never@1445 | 9 | * |
never@1445 | 10 | * This code is distributed in the hope that it will be useful, but WITHOUT |
never@1445 | 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
never@1445 | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
never@1445 | 13 | * version 2 for more details (a copy is included in the LICENSE file that |
never@1445 | 14 | * accompanied this code). |
never@1445 | 15 | * |
never@1445 | 16 | * You should have received a copy of the GNU General Public License version |
never@1445 | 17 | * 2 along with this work; if not, write to the Free Software Foundation, |
never@1445 | 18 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
never@1445 | 19 | * |
trims@1907 | 20 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 21 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 22 | * questions. |
never@1445 | 23 | * |
never@1445 | 24 | */ |
never@1445 | 25 | |
stefank@2314 | 26 | #include "precompiled.hpp" |
stefank@2314 | 27 | #include "assembler_zero.inline.hpp" |
stefank@2314 | 28 | #include "memory/resourceArea.hpp" |
stefank@2314 | 29 | #include "nativeInst_zero.hpp" |
stefank@2314 | 30 | #include "oops/oop.inline.hpp" |
stefank@2314 | 31 | #include "runtime/handles.hpp" |
stefank@2314 | 32 | #include "runtime/sharedRuntime.hpp" |
stefank@2314 | 33 | #include "runtime/stubRoutines.hpp" |
stefank@2314 | 34 | #include "utilities/ostream.hpp" |
stefank@2314 | 35 | #ifdef COMPILER1 |
stefank@2314 | 36 | #include "c1/c1_Runtime1.hpp" |
stefank@2314 | 37 | #endif |
never@1445 | 38 | |
never@1445 | 39 | // This method is called by nmethod::make_not_entrant_or_zombie to |
never@1445 | 40 | // insert a jump to SharedRuntime::get_handle_wrong_method_stub() |
never@1445 | 41 | // (dest) at the start of a compiled method (verified_entry) to avoid |
never@1445 | 42 | // a race where a method is invoked while being made non-entrant. |
never@1445 | 43 | // |
never@1445 | 44 | // In Shark, verified_entry is a pointer to a SharkEntry. We can |
never@1445 | 45 | // handle this simply by changing it's entry point to point at the |
never@1445 | 46 | // interpreter. This only works because the interpreter and Shark |
never@1445 | 47 | // calling conventions are the same. |
never@1445 | 48 | |
never@1445 | 49 | void NativeJump::patch_verified_entry(address entry, |
never@1445 | 50 | address verified_entry, |
never@1445 | 51 | address dest) { |
never@1445 | 52 | assert(dest == SharedRuntime::get_handle_wrong_method_stub(), "should be"); |
never@1445 | 53 | |
never@1445 | 54 | #ifdef CC_INTERP |
never@1445 | 55 | ((ZeroEntry*) verified_entry)->set_entry_point( |
never@1445 | 56 | (address) CppInterpreter::normal_entry); |
never@1445 | 57 | #else |
never@1445 | 58 | Unimplemented(); |
never@1445 | 59 | #endif // CC_INTERP |
never@1445 | 60 | } |