hotspot/src/cpu/zero/vm/interpreter_zero.cpp
author never
Thu, 12 May 2011 10:29:02 -0700
changeset 9636 363ca5579aff
parent 9136 94ebba447157
child 13391 30245956af37
permissions -rw-r--r--
7043461: VM crashes in void LinkResolver::runtime_resolve_virtual_method Reviewed-by: kvn, coleenp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     1
/*
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
     2
 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
     3
 * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     5
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     8
 * published by the Free Software Foundation.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     9
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    14
 * accompanied this code).
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    15
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    19
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4745
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4745
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4745
diff changeset
    22
 * questions.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    23
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    24
 */
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    25
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
#include "asm/assembler.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "interpreter/bytecodeHistogram.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "interpreter/interpreter.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "interpreter/interpreterGenerator.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
#include "interpreter/interpreterRuntime.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#include "interpreter/templateTable.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    33
#include "oops/arrayOop.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    34
#include "oops/methodDataOop.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    35
#include "oops/methodOop.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    36
#include "oops/oop.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
#include "prims/jvmtiExport.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    38
#include "prims/jvmtiThreadState.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    39
#include "prims/methodHandles.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    40
#include "runtime/arguments.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    41
#include "runtime/deoptimization.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    42
#include "runtime/frame.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    43
#include "runtime/sharedRuntime.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    44
#include "runtime/stubRoutines.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    45
#include "runtime/synchronizer.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    46
#include "runtime/timer.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    47
#include "runtime/vframeArray.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    48
#include "utilities/debug.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    49
#ifdef COMPILER1
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    50
#include "c1/c1_Runtime1.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    51
#endif
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    52
#ifdef CC_INTERP
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    53
#include "interpreter/cppInterpreter.hpp"
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    54
#endif
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    55
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    56
address AbstractInterpreterGenerator::generate_slow_signature_handler() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    57
  _masm->advance(1);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    58
  return (address) InterpreterRuntime::slow_signature_handler;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    59
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    60
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    61
address InterpreterGenerator::generate_math_entry(
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    62
    AbstractInterpreter::MethodKind kind) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    63
  if (!InlineIntrinsics)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    64
    return NULL;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    65
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    66
  Unimplemented();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    67
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    68
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    69
address InterpreterGenerator::generate_abstract_entry() {
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    70
  return generate_entry((address) ShouldNotCallThisEntry());
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    71
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    72
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    73
address InterpreterGenerator::generate_method_handle_entry() {
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    74
#ifdef CC_INTERP
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    75
  return generate_entry((address) CppInterpreter::method_handle_entry);
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    76
#else
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    77
  return generate_entry((address) ShouldNotCallThisEntry());
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    78
#endif // CC_INTERP
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    79
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    80
4745
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4013
diff changeset
    81
bool AbstractInterpreter::can_be_compiled(methodHandle m) {
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4013
diff changeset
    82
  return true;
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4013
diff changeset
    83
}
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4013
diff changeset
    84
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    85
void Deoptimization::unwind_callee_save_values(frame* f,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    86
                                               vframeArray* vframe_array) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    87
}