hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp
author never
Tue, 13 Oct 2009 12:04:21 -0700
changeset 4013 b154310845de
child 4448 d6ec2737186c
permissions -rw-r--r--
6890308: integrate zero assembler hotspot changes Reviewed-by: never Contributed-by: gbenson@redhat.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     1
/*
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     2
 * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     3
 * Copyright 2007, 2008 Red Hat, Inc.
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
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    20
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    21
 * CA 95054 USA or visit www.sun.com if you need additional information or
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    22
 * have any questions.
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
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    26
#include "incls/_precompiled.incl"
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    27
#include "incls/_sharedRuntime_zero.cpp.incl"
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    28
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    29
DeoptimizationBlob *SharedRuntime::_deopt_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    30
SafepointBlob      *SharedRuntime::_polling_page_safepoint_handler_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    31
SafepointBlob      *SharedRuntime::_polling_page_return_handler_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    32
RuntimeStub        *SharedRuntime::_wrong_method_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    33
RuntimeStub        *SharedRuntime::_ic_miss_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    34
RuntimeStub        *SharedRuntime::_resolve_opt_virtual_call_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    35
RuntimeStub        *SharedRuntime::_resolve_virtual_call_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    36
RuntimeStub        *SharedRuntime::_resolve_static_call_blob;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    37
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    38
int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    39
                                           VMRegPair *regs,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    40
                                           int total_args_passed,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    41
                                           int is_outgoing) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    42
  return 0;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    43
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    44
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    45
AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    46
                        MacroAssembler *masm,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    47
                        int total_args_passed,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    48
                        int comp_args_on_stack,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    49
                        const BasicType *sig_bt,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    50
                        const VMRegPair *regs) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    51
  return new AdapterHandlerEntry(
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    52
    ShouldNotCallThisStub(),
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    53
    ShouldNotCallThisStub(),
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    54
    ShouldNotCallThisStub());
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    55
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    56
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    57
nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    58
                                                methodHandle method,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    59
                                                int total_in_args,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    60
                                                int comp_args_on_stack,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    61
                                                BasicType *in_sig_bt,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    62
                                                VMRegPair *in_regs,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    63
                                                BasicType ret_type) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    64
  ShouldNotCallThis();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    65
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    66
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    67
int Deoptimization::last_frame_adjust(int callee_parameters,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    68
                                      int callee_locals) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    69
  return 0;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    70
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    71
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    72
uint SharedRuntime::out_preserve_stack_slots() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    73
  ShouldNotCallThis();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    74
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    75
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    76
static RuntimeStub* generate_empty_runtime_stub(const char* name) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    77
  CodeBuffer buffer(name, 0, 0);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    78
  return RuntimeStub::new_runtime_stub(name, &buffer, 0, 0, NULL, false);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    79
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    80
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    81
static SafepointBlob* generate_empty_safepoint_blob() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    82
  CodeBuffer buffer("handler_blob", 0, 0);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    83
  return SafepointBlob::create(&buffer, NULL, 0);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    84
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    85
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    86
void SharedRuntime::generate_stubs() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    87
  _wrong_method_blob =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    88
    generate_empty_runtime_stub("wrong_method_stub");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    89
  _ic_miss_blob =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    90
    generate_empty_runtime_stub("ic_miss_stub");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    91
  _resolve_opt_virtual_call_blob =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    92
    generate_empty_runtime_stub("resolve_opt_virtual_call");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    93
  _resolve_virtual_call_blob =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    94
    generate_empty_runtime_stub("resolve_virtual_call");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    95
  _resolve_static_call_blob =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    96
    generate_empty_runtime_stub("resolve_static_call");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    97
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    98
  _polling_page_safepoint_handler_blob =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    99
    generate_empty_safepoint_blob();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   100
  _polling_page_return_handler_blob =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   101
    generate_empty_safepoint_blob();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   102
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   103
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   104
int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   105
                                         VMRegPair *regs,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   106
                                         int total_args_passed) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   107
  ShouldNotCallThis();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   108
}