hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 1 489c9b5090e2
child 1066 717c3345024f
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
#include "incls/_precompiled.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
#include "incls/_interpreter_x86_32.cpp.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
#define __ _masm->
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
// Initialize the sentinel used to distinguish an interpreter return address.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
const int Interpreter::return_sentinel = 0xfeedbeed;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
//------------------------------------------------------------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
address AbstractInterpreterGenerator::generate_slow_signature_handler() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
  address entry = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  // rbx,: method
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  // rcx: temporary
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  // rdi: pointer to locals
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  // rsp: end of copied parameters area
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  __ movl(rcx, rsp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::slow_signature_handler), rbx, rdi, rcx);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  __ ret(0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  return entry;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
// Various method entries (that c++ and asm interpreter agree upon)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
//------------------------------------------------------------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
// Empty method, generate a very fast return.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
address InterpreterGenerator::generate_empty_entry(void) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  // rbx,: methodOop
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  // rcx: receiver (unused)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  // rsi: previous interpreter state (C++ interpreter) must preserve
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  // rsi: sender sp must set sp to this value on return
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  if (!UseFastEmptyMethods) return NULL;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  address entry_point = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  // If we need a safepoint check, generate full interpreter entry.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  Label slow_path;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  ExternalAddress state(SafepointSynchronize::address_of_state());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  __ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
           SafepointSynchronize::_not_synchronized);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  __ jcc(Assembler::notEqual, slow_path);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  // do nothing for empty methods (do not even increment invocation counter)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  // Code: _return
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  // _return
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  // return w/o popping parameters
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  __ popl(rax);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  __ movl(rsp, rsi);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  __ jmp(rax);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  __ bind(slow_path);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  (void) generate_normal_entry(false);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  return entry_point;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  // rbx,: methodOop
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  // rcx: scratrch
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  // rsi: sender sp
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  if (!InlineIntrinsics) return NULL; // Generate a vanilla entry
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  address entry_point = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  // These don't need a safepoint check because they aren't virtually
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  // callable. We won't enter these intrinsics from compiled code.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  // If in the future we added an intrinsic which was virtually callable
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  // we'd have to worry about how to safepoint so that this code is used.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  // mathematical functions inlined by compiler
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  // (interpreter must provide identical implementation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  // in order to avoid monotonicity bugs when switching
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  // from interpreter to compiler in the middle of some
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  // computation)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  // stack: [ ret adr ] <-- rsp
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  //        [ lo(arg) ]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  //        [ hi(arg) ]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  // Note: For JDK 1.2 StrictMath doesn't exist and Math.sin/cos/sqrt are
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  //       native methods. Interpreter::method_kind(...) does a check for
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  //       native methods first before checking for intrinsic methods and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  //       thus will never select this entry point. Make sure it is not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  //       called accidentally since the SharedRuntime entry points will
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  //       not work for JDK 1.2.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  // We no longer need to check for JDK 1.2 since it's EOL'ed.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  // The following check existed in pre 1.6 implementation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  //    if (Universe::is_jdk12x_version()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  //      __ should_not_reach_here();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  //    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  // Universe::is_jdk12x_version() always returns false since
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  // the JDK version is not yet determined when this method is called.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  // This method is called during interpreter_init() whereas
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  // JDK version is only determined when universe2_init() is called.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  // Note: For JDK 1.3 StrictMath exists and Math.sin/cos/sqrt are
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  //       java methods.  Interpreter::method_kind(...) will select
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  //       this entry point for the corresponding methods in JDK 1.3.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  // get argument
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  if (TaggedStackInterpreter) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
    __ pushl(Address(rsp, 3*wordSize));  // push hi (and note rsp -= wordSize)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
    __ pushl(Address(rsp, 2*wordSize));  // push lo
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
    __ fld_d(Address(rsp, 0));           // get double in ST0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    __ addl(rsp, 2*wordSize);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
    __ fld_d(Address(rsp, 1*wordSize));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  switch (kind) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
    case Interpreter::java_lang_math_sin :
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
        __ trigfunc('s');
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
    case Interpreter::java_lang_math_cos :
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
        __ trigfunc('c');
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
    case Interpreter::java_lang_math_tan :
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
        __ trigfunc('t');
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    case Interpreter::java_lang_math_sqrt:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
        __ fsqrt();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
    case Interpreter::java_lang_math_abs:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
        __ fabs();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
    case Interpreter::java_lang_math_log:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
        __ flog();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
        // Store to stack to convert 80bit precision back to 64bits
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
        __ push_fTOS();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
        __ pop_fTOS();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
    case Interpreter::java_lang_math_log10:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
        __ flog10();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
        // Store to stack to convert 80bit precision back to 64bits
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
        __ push_fTOS();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
        __ pop_fTOS();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
    default                              :
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
        ShouldNotReachHere();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  // return double result in xmm0 for interpreter and compilers.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  if (UseSSE >= 2) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
    __ subl(rsp, 2*wordSize);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
    __ fstp_d(Address(rsp, 0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
    __ movdbl(xmm0, Address(rsp, 0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
    __ addl(rsp, 2*wordSize);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  // done, result in FPU ST(0) or XMM0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  __ popl(rdi);                              // get return address
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  __ movl(rsp, rsi);                         // set sp to sender sp
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  __ jmp(rdi);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  return entry_point;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
// Abstract method entry
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
// Attempt to execute abstract method. Throw exception
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
address InterpreterGenerator::generate_abstract_entry(void) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  // rbx,: methodOop
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  // rcx: receiver (unused)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  // rsi: previous interpreter state (C++ interpreter) must preserve
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
  // rsi: sender SP
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
  address entry_point = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  // abstract method entry
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
  // remove return address. Not really needed, since exception handling throws away expression stack
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  __ popl(rbx);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  // adjust stack to what a normal return would do
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  __ movl(rsp, rsi);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  // throw exception
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  // the call_VM checks for exception, so we should never return here.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  __ should_not_reach_here();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  return entry_point;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
// This method tells the deoptimizer how big an interpreted frame must be:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
int AbstractInterpreter::size_activation(methodOop method,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
                                         int tempcount,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
                                         int popframe_extra_args,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
                                         int moncount,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
                                         int callee_param_count,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
                                         int callee_locals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
                                         bool is_top_frame) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  return layout_activation(method,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
                           tempcount,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
                           popframe_extra_args,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
                           moncount,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
                           callee_param_count,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
                           callee_locals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
                           (frame*) NULL,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
                           (frame*) NULL,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
                           is_top_frame);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  // This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
  // the days we had adapter frames. When we deoptimize a situation where a
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  // compiled caller calls a compiled caller will have registers it expects
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
  // to survive the call to the callee. If we deoptimize the callee the only
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
  // way we can restore these registers is to have the oldest interpreter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
  // frame that we create restore these values. That is what this routine
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
  // will accomplish.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
  // At the moment we have modified c2 to not have any callee save registers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
  // so this problem does not exist and this routine is just a place holder.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
  assert(f->is_interpreted_frame(), "must be interpreted");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
}