annotate src/cpu/x86/vm/interpreter_x86_32.cpp @ 986:62001a362ce9

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