hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.cpp
author coleenp
Tue, 12 Jan 2016 13:14:41 -0500
changeset 35479 62c12ca7a45e
parent 35214 hotspot/src/cpu/zero/vm/interpreter_zero.cpp@d86005e0b4c2
permissions -rw-r--r--
8146410: Interpreter functions are declared and defined in the wrong files Summary: Moved functions to the correct files. Reviewed-by: goetz, aph, twisti, mockner
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     1
/*
34651
07b1cc0f6040 8144534: Refactor templateInterpreter and templateInterpreterGenerator functions
coleenp
parents: 22234
diff changeset
     2
 * Copyright (c) 2003, 2015, 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"
35214
d86005e0b4c2 8074457: Remove the non-Zero CPP Interpreter
coleenp
parents: 34651
diff changeset
    29
#include "interpreter/cppInterpreterGenerator.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "interpreter/interpreterRuntime.hpp"
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
    31
#include "oops/method.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#include "runtime/arguments.hpp"
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    33
#include "interpreter/cppInterpreter.hpp"
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    34
35479
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    35
address CppInterpreterGenerator::generate_slow_signature_handler() {
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    36
  _masm->advance(1);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    37
  return (address) InterpreterRuntime::slow_signature_handler;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    38
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    39
35214
d86005e0b4c2 8074457: Remove the non-Zero CPP Interpreter
coleenp
parents: 34651
diff changeset
    40
address CppInterpreterGenerator::generate_math_entry(
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    41
    AbstractInterpreter::MethodKind kind) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    42
  if (!InlineIntrinsics)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    43
    return NULL;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    44
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    45
  Unimplemented();
19336
ddceb0657500 8022956: Clang: enable return type warnings on BSD
twisti
parents: 13728
diff changeset
    46
  return NULL;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    47
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    48
35214
d86005e0b4c2 8074457: Remove the non-Zero CPP Interpreter
coleenp
parents: 34651
diff changeset
    49
address CppInterpreterGenerator::generate_abstract_entry() {
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
    50
  return generate_entry((address) ShouldNotCallThisEntry());
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    51
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    52
35479
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    53
address CppInterpreterGenerator::generate_empty_entry() {
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    54
  if (!UseFastEmptyMethods)
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    55
    return NULL;
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    56
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    57
  return generate_entry((address) CppInterpreter::empty_entry);
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    58
}
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    59
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    60
address CppInterpreterGenerator::generate_accessor_entry() {
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    61
  if (!UseFastAccessorMethods)
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    62
    return NULL;
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    63
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    64
  return generate_entry((address) CppInterpreter::accessor_entry);
4745
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4013
diff changeset
    65
}
35479
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    66
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    67
address CppInterpreterGenerator::generate_Reference_get_entry(void) {
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    68
#if INCLUDE_ALL_GCS
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    69
  if (UseG1GC) {
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    70
    // We need to generate have a routine that generates code to:
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    71
    //   * load the value in the referent field
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    72
    //   * passes that value to the pre-barrier.
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    73
    //
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    74
    // In the case of G1 this will record the value of the
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    75
    // referent in an SATB buffer if marking is active.
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    76
    // This will cause concurrent marking to mark the referent
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    77
    // field as live.
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    78
    Unimplemented();
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    79
  }
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    80
#endif // INCLUDE_ALL_GCS
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    81
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    82
  // If G1 is not enabled then attempt to go through the normal entry point
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    83
  // Reference.get could be instrumented by jvmti
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    84
  return NULL;
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    85
}
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    86
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    87
address CppInterpreterGenerator::generate_native_entry(bool synchronized) {
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    88
  return generate_entry((address) CppInterpreter::native_entry);
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    89
}
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    90
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    91
address CppInterpreterGenerator::generate_normal_entry(bool synchronized) {
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    92
  return generate_entry((address) CppInterpreter::normal_entry);
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35214
diff changeset
    93
}