Print this page
rev 1022 : 6829192: JSR 292 needs to support 64-bit x86
Summary: changes for method handles and invokedynamic
Reviewed-by: ?, ?
Split |
Close |
Expand all |
Collapse all |
--- old/src/cpu/x86/vm/interp_masm_x86_64.cpp
+++ new/src/cpu/x86/vm/interp_masm_x86_64.cpp
1 1 /*
2 2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 4 *
5 5 * This code is free software; you can redistribute it and/or modify it
6 6 * under the terms of the GNU General Public License version 2 only, as
7 7 * published by the Free Software Foundation.
8 8 *
9 9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 12 * version 2 for more details (a copy is included in the LICENSE file that
13 13 * accompanied this code).
14 14 *
15 15 * You should have received a copy of the GNU General Public License version
16 16 * 2 along with this work; if not, write to the Free Software Foundation,
17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 18 *
19 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 21 * have any questions.
22 22 *
23 23 */
24 24
25 25 #include "incls/_precompiled.incl"
26 26 #include "incls/_interp_masm_x86_64.cpp.incl"
27 27
28 28
29 29 // Implementation of InterpreterMacroAssembler
30 30
31 31 #ifdef CC_INTERP
32 32 void InterpreterMacroAssembler::get_method(Register reg) {
33 33 movptr(reg, Address(rbp, -((int)sizeof(BytecodeInterpreter) + 2 * wordSize)));
34 34 movptr(reg, Address(reg, byte_offset_of(BytecodeInterpreter, _method)));
35 35 }
36 36 #endif // CC_INTERP
37 37
38 38 #ifndef CC_INTERP
39 39
40 40 void InterpreterMacroAssembler::call_VM_leaf_base(address entry_point,
41 41 int number_of_arguments) {
42 42 // interpreter specific
43 43 //
44 44 // Note: No need to save/restore bcp & locals (r13 & r14) pointer
45 45 // since these are callee saved registers and no blocking/
46 46 // GC can happen in leaf calls.
47 47 // Further Note: DO NOT save/restore bcp/locals. If a caller has
48 48 // already saved them so that it can use esi/edi as temporaries
49 49 // then a save/restore here will DESTROY the copy the caller
50 50 // saved! There used to be a save_bcp() that only happened in
51 51 // the ASSERT path (no restore_bcp). Which caused bizarre failures
52 52 // when jvm built with ASSERTs.
53 53 #ifdef ASSERT
54 54 {
55 55 Label L;
56 56 cmpptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
57 57 jcc(Assembler::equal, L);
58 58 stop("InterpreterMacroAssembler::call_VM_leaf_base:"
59 59 " last_sp != NULL");
60 60 bind(L);
61 61 }
62 62 #endif
63 63 // super call
64 64 MacroAssembler::call_VM_leaf_base(entry_point, number_of_arguments);
65 65 // interpreter specific
66 66 // Used to ASSERT that r13/r14 were equal to frame's bcp/locals
67 67 // but since they may not have been saved (and we don't want to
68 68 // save thme here (see note above) the assert is invalid.
69 69 }
70 70
71 71 void InterpreterMacroAssembler::call_VM_base(Register oop_result,
72 72 Register java_thread,
73 73 Register last_java_sp,
74 74 address entry_point,
75 75 int number_of_arguments,
76 76 bool check_exceptions) {
77 77 // interpreter specific
78 78 //
79 79 // Note: Could avoid restoring locals ptr (callee saved) - however doesn't
80 80 // really make a difference for these runtime calls, since they are
81 81 // slow anyway. Btw., bcp must be saved/restored since it may change
82 82 // due to GC.
83 83 // assert(java_thread == noreg , "not expecting a precomputed java thread");
84 84 save_bcp();
85 85 #ifdef ASSERT
86 86 {
87 87 Label L;
88 88 cmpptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
89 89 jcc(Assembler::equal, L);
90 90 stop("InterpreterMacroAssembler::call_VM_leaf_base:"
91 91 " last_sp != NULL");
92 92 bind(L);
93 93 }
94 94 #endif /* ASSERT */
95 95 // super call
96 96 MacroAssembler::call_VM_base(oop_result, noreg, last_java_sp,
97 97 entry_point, number_of_arguments,
98 98 check_exceptions);
99 99 // interpreter specific
100 100 restore_bcp();
101 101 restore_locals();
102 102 }
103 103
104 104
105 105 void InterpreterMacroAssembler::check_and_handle_popframe(Register java_thread) {
106 106 if (JvmtiExport::can_pop_frame()) {
107 107 Label L;
108 108 // Initiate popframe handling only if it is not already being
109 109 // processed. If the flag has the popframe_processing bit set, it
110 110 // means that this code is called *during* popframe handling - we
111 111 // don't want to reenter.
112 112 // This method is only called just after the call into the vm in
113 113 // call_VM_base, so the arg registers are available.
114 114 movl(c_rarg0, Address(r15_thread, JavaThread::popframe_condition_offset()));
115 115 testl(c_rarg0, JavaThread::popframe_pending_bit);
116 116 jcc(Assembler::zero, L);
117 117 testl(c_rarg0, JavaThread::popframe_processing_bit);
118 118 jcc(Assembler::notZero, L);
119 119 // Call Interpreter::remove_activation_preserving_args_entry() to get the
120 120 // address of the same-named entrypoint in the generated interpreter code.
121 121 call_VM_leaf(CAST_FROM_FN_PTR(address, Interpreter::remove_activation_preserving_args_entry));
122 122 jmp(rax);
123 123 bind(L);
124 124 }
125 125 }
126 126
127 127
128 128 void InterpreterMacroAssembler::load_earlyret_value(TosState state) {
129 129 movptr(rcx, Address(r15_thread, JavaThread::jvmti_thread_state_offset()));
130 130 const Address tos_addr(rcx, JvmtiThreadState::earlyret_tos_offset());
131 131 const Address oop_addr(rcx, JvmtiThreadState::earlyret_oop_offset());
132 132 const Address val_addr(rcx, JvmtiThreadState::earlyret_value_offset());
133 133 switch (state) {
134 134 case atos: movptr(rax, oop_addr);
135 135 movptr(oop_addr, (int32_t)NULL_WORD);
136 136 verify_oop(rax, state); break;
137 137 case ltos: movptr(rax, val_addr); break;
138 138 case btos: // fall through
139 139 case ctos: // fall through
140 140 case stos: // fall through
141 141 case itos: movl(rax, val_addr); break;
142 142 case ftos: movflt(xmm0, val_addr); break;
143 143 case dtos: movdbl(xmm0, val_addr); break;
144 144 case vtos: /* nothing to do */ break;
145 145 default : ShouldNotReachHere();
146 146 }
147 147 // Clean up tos value in the thread object
148 148 movl(tos_addr, (int) ilgl);
149 149 movl(val_addr, (int32_t) NULL_WORD);
150 150 }
151 151
152 152
153 153 void InterpreterMacroAssembler::check_and_handle_earlyret(Register java_thread) {
154 154 if (JvmtiExport::can_force_early_return()) {
155 155 Label L;
156 156 movptr(c_rarg0, Address(r15_thread, JavaThread::jvmti_thread_state_offset()));
157 157 testptr(c_rarg0, c_rarg0);
158 158 jcc(Assembler::zero, L); // if (thread->jvmti_thread_state() == NULL) exit;
159 159
160 160 // Initiate earlyret handling only if it is not already being processed.
161 161 // If the flag has the earlyret_processing bit set, it means that this code
162 162 // is called *during* earlyret handling - we don't want to reenter.
163 163 movl(c_rarg0, Address(c_rarg0, JvmtiThreadState::earlyret_state_offset()));
164 164 cmpl(c_rarg0, JvmtiThreadState::earlyret_pending);
165 165 jcc(Assembler::notEqual, L);
166 166
167 167 // Call Interpreter::remove_activation_early_entry() to get the address of the
168 168 // same-named entrypoint in the generated interpreter code.
169 169 movptr(c_rarg0, Address(r15_thread, JavaThread::jvmti_thread_state_offset()));
170 170 movl(c_rarg0, Address(c_rarg0, JvmtiThreadState::earlyret_tos_offset()));
171 171 call_VM_leaf(CAST_FROM_FN_PTR(address, Interpreter::remove_activation_early_entry), c_rarg0);
172 172 jmp(rax);
173 173 bind(L);
174 174 }
175 175 }
176 176
177 177
↓ open down ↓ |
177 lines elided |
↑ open up ↑ |
178 178 void InterpreterMacroAssembler::get_unsigned_2_byte_index_at_bcp(
179 179 Register reg,
180 180 int bcp_offset) {
181 181 assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode");
182 182 movl(reg, Address(r13, bcp_offset));
183 183 bswapl(reg);
184 184 shrl(reg, 16);
185 185 }
186 186
187 187
188 +void InterpreterMacroAssembler::get_cache_index_at_bcp(Register index,
189 + int bcp_offset,
190 + bool giant_index) {
191 + assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
192 + if (!giant_index) {
193 + load_unsigned_short(index, Address(r13, bcp_offset));
194 + } else {
195 + assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic");
196 + movl(index, Address(r13, bcp_offset));
197 + // Check if the secondary index definition is still ~x, otherwise
198 + // we have to change the following assembler code to calculate the
199 + // plain index.
200 + assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line");
201 + notl(index); // convert to plain index
202 + }
203 +}
204 +
205 +
188 206 void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache,
189 207 Register index,
190 - int bcp_offset) {
191 - assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
208 + int bcp_offset,
209 + bool giant_index) {
192 210 assert(cache != index, "must use different registers");
193 - load_unsigned_short(index, Address(r13, bcp_offset));
211 + get_cache_index_at_bcp(index, bcp_offset, giant_index);
194 212 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize));
195 213 assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
196 214 // convert from field index to ConstantPoolCacheEntry index
197 215 shll(index, 2);
198 216 }
199 217
200 218
201 219 void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache,
202 220 Register tmp,
203 - int bcp_offset) {
204 - assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
221 + int bcp_offset,
222 + bool giant_index) {
205 223 assert(cache != tmp, "must use different register");
206 - load_unsigned_short(tmp, Address(r13, bcp_offset));
224 + get_cache_index_at_bcp(tmp, bcp_offset, giant_index);
207 225 assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
208 226 // convert from field index to ConstantPoolCacheEntry index
209 227 // and from word offset to byte offset
210 228 shll(tmp, 2 + LogBytesPerWord);
211 229 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize));
212 230 // skip past the header
213 231 addptr(cache, in_bytes(constantPoolCacheOopDesc::base_offset()));
214 232 addptr(cache, tmp); // construct pointer to cache entry
215 233 }
216 234
217 235
218 236 // Generate a subtype check: branch to ok_is_subtype if sub_klass is a
219 237 // subtype of super_klass.
220 238 //
221 239 // Args:
222 240 // rax: superklass
223 241 // Rsub_klass: subklass
224 242 //
225 243 // Kills:
226 244 // rcx, rdi
227 245 void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
228 246 Label& ok_is_subtype) {
229 247 assert(Rsub_klass != rax, "rax holds superklass");
230 248 assert(Rsub_klass != r14, "r14 holds locals");
231 249 assert(Rsub_klass != r13, "r13 holds bcp");
232 250 assert(Rsub_klass != rcx, "rcx holds 2ndary super array length");
233 251 assert(Rsub_klass != rdi, "rdi holds 2ndary super array scan ptr");
234 252
235 253 // Profile the not-null value's klass.
236 254 profile_typecheck(rcx, Rsub_klass, rdi); // blows rcx, reloads rdi
237 255
238 256 // Do the check.
239 257 check_klass_subtype(Rsub_klass, rax, rcx, ok_is_subtype); // blows rcx
240 258
241 259 // Profile the failure of the check.
242 260 profile_typecheck_failed(rcx); // blows rcx
243 261 }
244 262
245 263
246 264
247 265 // Java Expression Stack
248 266
249 267 #ifdef ASSERT
250 268 // Verifies that the stack tag matches. Must be called before the stack
251 269 // value is popped off the stack.
252 270 void InterpreterMacroAssembler::verify_stack_tag(frame::Tag t) {
253 271 if (TaggedStackInterpreter) {
254 272 frame::Tag tag = t;
255 273 if (t == frame::TagCategory2) {
256 274 tag = frame::TagValue;
257 275 Label hokay;
258 276 cmpptr(Address(rsp, 3*wordSize), (int32_t)tag);
259 277 jcc(Assembler::equal, hokay);
260 278 stop("Java Expression stack tag high value is bad");
261 279 bind(hokay);
262 280 }
263 281 Label okay;
264 282 cmpptr(Address(rsp, wordSize), (int32_t)tag);
265 283 jcc(Assembler::equal, okay);
266 284 // Also compare if the stack value is zero, then the tag might
267 285 // not have been set coming from deopt.
268 286 cmpptr(Address(rsp, 0), 0);
269 287 jcc(Assembler::equal, okay);
270 288 stop("Java Expression stack tag value is bad");
271 289 bind(okay);
272 290 }
273 291 }
274 292 #endif // ASSERT
275 293
276 294 void InterpreterMacroAssembler::pop_ptr(Register r) {
277 295 debug_only(verify_stack_tag(frame::TagReference));
278 296 pop(r);
279 297 if (TaggedStackInterpreter) addptr(rsp, 1 * wordSize);
280 298 }
281 299
282 300 void InterpreterMacroAssembler::pop_ptr(Register r, Register tag) {
283 301 pop(r);
284 302 if (TaggedStackInterpreter) pop(tag);
285 303 }
286 304
287 305 void InterpreterMacroAssembler::pop_i(Register r) {
288 306 // XXX can't use pop currently, upper half non clean
289 307 debug_only(verify_stack_tag(frame::TagValue));
290 308 movl(r, Address(rsp, 0));
291 309 addptr(rsp, wordSize);
292 310 if (TaggedStackInterpreter) addptr(rsp, 1 * wordSize);
293 311 }
294 312
295 313 void InterpreterMacroAssembler::pop_l(Register r) {
296 314 debug_only(verify_stack_tag(frame::TagCategory2));
297 315 movq(r, Address(rsp, 0));
298 316 addptr(rsp, 2 * Interpreter::stackElementSize());
299 317 }
300 318
301 319 void InterpreterMacroAssembler::pop_f(XMMRegister r) {
302 320 debug_only(verify_stack_tag(frame::TagValue));
303 321 movflt(r, Address(rsp, 0));
304 322 addptr(rsp, wordSize);
305 323 if (TaggedStackInterpreter) addptr(rsp, 1 * wordSize);
306 324 }
307 325
308 326 void InterpreterMacroAssembler::pop_d(XMMRegister r) {
309 327 debug_only(verify_stack_tag(frame::TagCategory2));
310 328 movdbl(r, Address(rsp, 0));
311 329 addptr(rsp, 2 * Interpreter::stackElementSize());
312 330 }
313 331
314 332 void InterpreterMacroAssembler::push_ptr(Register r) {
315 333 if (TaggedStackInterpreter) push(frame::TagReference);
316 334 push(r);
317 335 }
318 336
319 337 void InterpreterMacroAssembler::push_ptr(Register r, Register tag) {
320 338 if (TaggedStackInterpreter) push(tag);
321 339 push(r);
322 340 }
323 341
324 342 void InterpreterMacroAssembler::push_i(Register r) {
325 343 if (TaggedStackInterpreter) push(frame::TagValue);
326 344 push(r);
327 345 }
328 346
329 347 void InterpreterMacroAssembler::push_l(Register r) {
330 348 if (TaggedStackInterpreter) {
331 349 push(frame::TagValue);
332 350 subptr(rsp, 1 * wordSize);
333 351 push(frame::TagValue);
334 352 subptr(rsp, 1 * wordSize);
335 353 } else {
336 354 subptr(rsp, 2 * wordSize);
337 355 }
338 356 movq(Address(rsp, 0), r);
339 357 }
340 358
341 359 void InterpreterMacroAssembler::push_f(XMMRegister r) {
342 360 if (TaggedStackInterpreter) push(frame::TagValue);
343 361 subptr(rsp, wordSize);
344 362 movflt(Address(rsp, 0), r);
345 363 }
346 364
347 365 void InterpreterMacroAssembler::push_d(XMMRegister r) {
348 366 if (TaggedStackInterpreter) {
349 367 push(frame::TagValue);
350 368 subptr(rsp, 1 * wordSize);
351 369 push(frame::TagValue);
352 370 subptr(rsp, 1 * wordSize);
353 371 } else {
354 372 subptr(rsp, 2 * wordSize);
355 373 }
356 374 movdbl(Address(rsp, 0), r);
357 375 }
358 376
359 377 void InterpreterMacroAssembler::pop(TosState state) {
360 378 switch (state) {
361 379 case atos: pop_ptr(); break;
362 380 case btos:
363 381 case ctos:
364 382 case stos:
365 383 case itos: pop_i(); break;
366 384 case ltos: pop_l(); break;
367 385 case ftos: pop_f(); break;
368 386 case dtos: pop_d(); break;
369 387 case vtos: /* nothing to do */ break;
370 388 default: ShouldNotReachHere();
371 389 }
372 390 verify_oop(rax, state);
373 391 }
374 392
375 393 void InterpreterMacroAssembler::push(TosState state) {
376 394 verify_oop(rax, state);
377 395 switch (state) {
378 396 case atos: push_ptr(); break;
379 397 case btos:
380 398 case ctos:
381 399 case stos:
382 400 case itos: push_i(); break;
383 401 case ltos: push_l(); break;
384 402 case ftos: push_f(); break;
385 403 case dtos: push_d(); break;
386 404 case vtos: /* nothing to do */ break;
387 405 default : ShouldNotReachHere();
388 406 }
389 407 }
390 408
391 409
392 410
393 411
394 412 // Tagged stack helpers for swap and dup
395 413 void InterpreterMacroAssembler::load_ptr_and_tag(int n, Register val,
396 414 Register tag) {
397 415 movptr(val, Address(rsp, Interpreter::expr_offset_in_bytes(n)));
398 416 if (TaggedStackInterpreter) {
399 417 movptr(tag, Address(rsp, Interpreter::expr_tag_offset_in_bytes(n)));
400 418 }
401 419 }
402 420
403 421 void InterpreterMacroAssembler::store_ptr_and_tag(int n, Register val,
404 422 Register tag) {
405 423 movptr(Address(rsp, Interpreter::expr_offset_in_bytes(n)), val);
406 424 if (TaggedStackInterpreter) {
407 425 movptr(Address(rsp, Interpreter::expr_tag_offset_in_bytes(n)), tag);
408 426 }
409 427 }
410 428
411 429
412 430 // Tagged local support
413 431 void InterpreterMacroAssembler::tag_local(frame::Tag tag, int n) {
414 432 if (TaggedStackInterpreter) {
415 433 if (tag == frame::TagCategory2) {
416 434 movptr(Address(r14, Interpreter::local_tag_offset_in_bytes(n+1)),
417 435 (int32_t)frame::TagValue);
418 436 movptr(Address(r14, Interpreter::local_tag_offset_in_bytes(n)),
419 437 (int32_t)frame::TagValue);
420 438 } else {
421 439 movptr(Address(r14, Interpreter::local_tag_offset_in_bytes(n)), (int32_t)tag);
422 440 }
423 441 }
424 442 }
425 443
426 444 void InterpreterMacroAssembler::tag_local(frame::Tag tag, Register idx) {
427 445 if (TaggedStackInterpreter) {
428 446 if (tag == frame::TagCategory2) {
429 447 movptr(Address(r14, idx, Address::times_8,
430 448 Interpreter::local_tag_offset_in_bytes(1)), (int32_t)frame::TagValue);
431 449 movptr(Address(r14, idx, Address::times_8,
432 450 Interpreter::local_tag_offset_in_bytes(0)), (int32_t)frame::TagValue);
433 451 } else {
434 452 movptr(Address(r14, idx, Address::times_8, Interpreter::local_tag_offset_in_bytes(0)),
435 453 (int32_t)tag);
436 454 }
437 455 }
438 456 }
439 457
440 458 void InterpreterMacroAssembler::tag_local(Register tag, Register idx) {
441 459 if (TaggedStackInterpreter) {
442 460 // can only be TagValue or TagReference
443 461 movptr(Address(r14, idx, Address::times_8, Interpreter::local_tag_offset_in_bytes(0)), tag);
444 462 }
445 463 }
446 464
447 465
448 466 void InterpreterMacroAssembler::tag_local(Register tag, int n) {
449 467 if (TaggedStackInterpreter) {
450 468 // can only be TagValue or TagReference
451 469 movptr(Address(r14, Interpreter::local_tag_offset_in_bytes(n)), tag);
452 470 }
453 471 }
454 472
455 473 #ifdef ASSERT
456 474 void InterpreterMacroAssembler::verify_local_tag(frame::Tag tag, int n) {
457 475 if (TaggedStackInterpreter) {
458 476 frame::Tag t = tag;
459 477 if (tag == frame::TagCategory2) {
460 478 Label nbl;
461 479 t = frame::TagValue; // change to what is stored in locals
462 480 cmpptr(Address(r14, Interpreter::local_tag_offset_in_bytes(n+1)), (int32_t)t);
463 481 jcc(Assembler::equal, nbl);
464 482 stop("Local tag is bad for long/double");
465 483 bind(nbl);
466 484 }
467 485 Label notBad;
468 486 cmpq(Address(r14, Interpreter::local_tag_offset_in_bytes(n)), (int32_t)t);
469 487 jcc(Assembler::equal, notBad);
470 488 // Also compare if the local value is zero, then the tag might
471 489 // not have been set coming from deopt.
472 490 cmpptr(Address(r14, Interpreter::local_offset_in_bytes(n)), 0);
473 491 jcc(Assembler::equal, notBad);
474 492 stop("Local tag is bad");
475 493 bind(notBad);
476 494 }
477 495 }
478 496
479 497 void InterpreterMacroAssembler::verify_local_tag(frame::Tag tag, Register idx) {
480 498 if (TaggedStackInterpreter) {
481 499 frame::Tag t = tag;
482 500 if (tag == frame::TagCategory2) {
483 501 Label nbl;
484 502 t = frame::TagValue; // change to what is stored in locals
485 503 cmpptr(Address(r14, idx, Address::times_8, Interpreter::local_tag_offset_in_bytes(1)), (int32_t)t);
486 504 jcc(Assembler::equal, nbl);
487 505 stop("Local tag is bad for long/double");
488 506 bind(nbl);
489 507 }
490 508 Label notBad;
491 509 cmpptr(Address(r14, idx, Address::times_8, Interpreter::local_tag_offset_in_bytes(0)), (int32_t)t);
492 510 jcc(Assembler::equal, notBad);
493 511 // Also compare if the local value is zero, then the tag might
494 512 // not have been set coming from deopt.
495 513 cmpptr(Address(r14, idx, Address::times_8, Interpreter::local_offset_in_bytes(0)), 0);
496 514 jcc(Assembler::equal, notBad);
497 515 stop("Local tag is bad");
498 516 bind(notBad);
499 517 }
500 518 }
501 519 #endif // ASSERT
502 520
503 521
504 522 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point) {
505 523 MacroAssembler::call_VM_leaf_base(entry_point, 0);
506 524 }
507 525
508 526
509 527 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point,
510 528 Register arg_1) {
511 529 if (c_rarg0 != arg_1) {
512 530 mov(c_rarg0, arg_1);
513 531 }
514 532 MacroAssembler::call_VM_leaf_base(entry_point, 1);
515 533 }
516 534
517 535
518 536 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point,
519 537 Register arg_1,
520 538 Register arg_2) {
521 539 assert(c_rarg0 != arg_2, "smashed argument");
522 540 assert(c_rarg1 != arg_1, "smashed argument");
523 541 if (c_rarg0 != arg_1) {
524 542 mov(c_rarg0, arg_1);
525 543 }
526 544 if (c_rarg1 != arg_2) {
527 545 mov(c_rarg1, arg_2);
528 546 }
529 547 MacroAssembler::call_VM_leaf_base(entry_point, 2);
530 548 }
531 549
532 550 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point,
533 551 Register arg_1,
534 552 Register arg_2,
535 553 Register arg_3) {
536 554 assert(c_rarg0 != arg_2, "smashed argument");
537 555 assert(c_rarg0 != arg_3, "smashed argument");
538 556 assert(c_rarg1 != arg_1, "smashed argument");
539 557 assert(c_rarg1 != arg_3, "smashed argument");
540 558 assert(c_rarg2 != arg_1, "smashed argument");
541 559 assert(c_rarg2 != arg_2, "smashed argument");
542 560 if (c_rarg0 != arg_1) {
543 561 mov(c_rarg0, arg_1);
544 562 }
545 563 if (c_rarg1 != arg_2) {
546 564 mov(c_rarg1, arg_2);
547 565 }
548 566 if (c_rarg2 != arg_3) {
549 567 mov(c_rarg2, arg_3);
550 568 }
551 569 MacroAssembler::call_VM_leaf_base(entry_point, 3);
552 570 }
553 571
554 572 void InterpreterMacroAssembler::prepare_to_jump_from_interpreted() {
555 573 // set sender sp
556 574 lea(r13, Address(rsp, wordSize));
557 575 // record last_sp
558 576 movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), r13);
559 577 }
560 578
561 579
562 580 // Jump to from_interpreted entry of a call unless single stepping is possible
563 581 // in this thread in which case we must call the i2i entry
564 582 void InterpreterMacroAssembler::jump_from_interpreted(Register method, Register temp) {
565 583 prepare_to_jump_from_interpreted();
566 584
567 585 if (JvmtiExport::can_post_interpreter_events()) {
568 586 Label run_compiled_code;
569 587 // JVMTI events, such as single-stepping, are implemented partly by avoiding running
570 588 // compiled code in threads for which the event is enabled. Check here for
571 589 // interp_only_mode if these events CAN be enabled.
572 590 get_thread(temp);
573 591 // interp_only is an int, on little endian it is sufficient to test the byte only
574 592 // Is a cmpl faster (ce
575 593 cmpb(Address(temp, JavaThread::interp_only_mode_offset()), 0);
576 594 jcc(Assembler::zero, run_compiled_code);
577 595 jmp(Address(method, methodOopDesc::interpreter_entry_offset()));
578 596 bind(run_compiled_code);
579 597 }
580 598
581 599 jmp(Address(method, methodOopDesc::from_interpreted_offset()));
582 600
583 601 }
584 602
585 603
586 604 // The following two routines provide a hook so that an implementation
587 605 // can schedule the dispatch in two parts. amd64 does not do this.
588 606 void InterpreterMacroAssembler::dispatch_prolog(TosState state, int step) {
589 607 // Nothing amd64 specific to be done here
590 608 }
591 609
592 610 void InterpreterMacroAssembler::dispatch_epilog(TosState state, int step) {
593 611 dispatch_next(state, step);
594 612 }
595 613
596 614 void InterpreterMacroAssembler::dispatch_base(TosState state,
597 615 address* table,
598 616 bool verifyoop) {
599 617 verify_FPU(1, state);
600 618 if (VerifyActivationFrameSize) {
601 619 Label L;
602 620 mov(rcx, rbp);
603 621 subptr(rcx, rsp);
604 622 int32_t min_frame_size =
605 623 (frame::link_offset - frame::interpreter_frame_initial_sp_offset) *
606 624 wordSize;
607 625 cmpptr(rcx, (int32_t)min_frame_size);
608 626 jcc(Assembler::greaterEqual, L);
609 627 stop("broken stack frame");
610 628 bind(L);
611 629 }
612 630 if (verifyoop) {
613 631 verify_oop(rax, state);
614 632 }
615 633 lea(rscratch1, ExternalAddress((address)table));
616 634 jmp(Address(rscratch1, rbx, Address::times_8));
617 635 }
618 636
619 637 void InterpreterMacroAssembler::dispatch_only(TosState state) {
620 638 dispatch_base(state, Interpreter::dispatch_table(state));
621 639 }
622 640
623 641 void InterpreterMacroAssembler::dispatch_only_normal(TosState state) {
624 642 dispatch_base(state, Interpreter::normal_table(state));
625 643 }
626 644
627 645 void InterpreterMacroAssembler::dispatch_only_noverify(TosState state) {
628 646 dispatch_base(state, Interpreter::normal_table(state), false);
629 647 }
630 648
631 649
632 650 void InterpreterMacroAssembler::dispatch_next(TosState state, int step) {
633 651 // load next bytecode (load before advancing r13 to prevent AGI)
634 652 load_unsigned_byte(rbx, Address(r13, step));
635 653 // advance r13
636 654 increment(r13, step);
637 655 dispatch_base(state, Interpreter::dispatch_table(state));
638 656 }
639 657
640 658 void InterpreterMacroAssembler::dispatch_via(TosState state, address* table) {
641 659 // load current bytecode
642 660 load_unsigned_byte(rbx, Address(r13, 0));
643 661 dispatch_base(state, table);
644 662 }
645 663
646 664 // remove activation
647 665 //
648 666 // Unlock the receiver if this is a synchronized method.
649 667 // Unlock any Java monitors from syncronized blocks.
650 668 // Remove the activation from the stack.
651 669 //
652 670 // If there are locked Java monitors
653 671 // If throw_monitor_exception
654 672 // throws IllegalMonitorStateException
655 673 // Else if install_monitor_exception
656 674 // installs IllegalMonitorStateException
657 675 // Else
658 676 // no error processing
659 677 void InterpreterMacroAssembler::remove_activation(
660 678 TosState state,
661 679 Register ret_addr,
662 680 bool throw_monitor_exception,
663 681 bool install_monitor_exception,
664 682 bool notify_jvmdi) {
665 683 // Note: Registers rdx xmm0 may be in use for the
666 684 // result check if synchronized method
667 685 Label unlocked, unlock, no_unlock;
668 686
669 687 // get the value of _do_not_unlock_if_synchronized into rdx
670 688 const Address do_not_unlock_if_synchronized(r15_thread,
671 689 in_bytes(JavaThread::do_not_unlock_if_synchronized_offset()));
672 690 movbool(rdx, do_not_unlock_if_synchronized);
673 691 movbool(do_not_unlock_if_synchronized, false); // reset the flag
674 692
675 693 // get method access flags
676 694 movptr(rbx, Address(rbp, frame::interpreter_frame_method_offset * wordSize));
677 695 movl(rcx, Address(rbx, methodOopDesc::access_flags_offset()));
678 696 testl(rcx, JVM_ACC_SYNCHRONIZED);
679 697 jcc(Assembler::zero, unlocked);
680 698
681 699 // Don't unlock anything if the _do_not_unlock_if_synchronized flag
682 700 // is set.
683 701 testbool(rdx);
684 702 jcc(Assembler::notZero, no_unlock);
685 703
686 704 // unlock monitor
687 705 push(state); // save result
688 706
689 707 // BasicObjectLock will be first in list, since this is a
690 708 // synchronized method. However, need to check that the object has
691 709 // not been unlocked by an explicit monitorexit bytecode.
692 710 const Address monitor(rbp, frame::interpreter_frame_initial_sp_offset *
693 711 wordSize - (int) sizeof(BasicObjectLock));
694 712 // We use c_rarg1 so that if we go slow path it will be the correct
695 713 // register for unlock_object to pass to VM directly
696 714 lea(c_rarg1, monitor); // address of first monitor
697 715
698 716 movptr(rax, Address(c_rarg1, BasicObjectLock::obj_offset_in_bytes()));
699 717 testptr(rax, rax);
700 718 jcc(Assembler::notZero, unlock);
701 719
702 720 pop(state);
703 721 if (throw_monitor_exception) {
704 722 // Entry already unlocked, need to throw exception
705 723 call_VM(noreg, CAST_FROM_FN_PTR(address,
706 724 InterpreterRuntime::throw_illegal_monitor_state_exception));
707 725 should_not_reach_here();
708 726 } else {
709 727 // Monitor already unlocked during a stack unroll. If requested,
710 728 // install an illegal_monitor_state_exception. Continue with
711 729 // stack unrolling.
712 730 if (install_monitor_exception) {
713 731 call_VM(noreg, CAST_FROM_FN_PTR(address,
714 732 InterpreterRuntime::new_illegal_monitor_state_exception));
715 733 }
716 734 jmp(unlocked);
717 735 }
718 736
719 737 bind(unlock);
720 738 unlock_object(c_rarg1);
721 739 pop(state);
722 740
723 741 // Check that for block-structured locking (i.e., that all locked
724 742 // objects has been unlocked)
725 743 bind(unlocked);
726 744
727 745 // rax: Might contain return value
728 746
729 747 // Check that all monitors are unlocked
730 748 {
731 749 Label loop, exception, entry, restart;
732 750 const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
733 751 const Address monitor_block_top(
734 752 rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
735 753 const Address monitor_block_bot(
736 754 rbp, frame::interpreter_frame_initial_sp_offset * wordSize);
737 755
738 756 bind(restart);
739 757 // We use c_rarg1 so that if we go slow path it will be the correct
740 758 // register for unlock_object to pass to VM directly
741 759 movptr(c_rarg1, monitor_block_top); // points to current entry, starting
742 760 // with top-most entry
743 761 lea(rbx, monitor_block_bot); // points to word before bottom of
744 762 // monitor block
745 763 jmp(entry);
746 764
747 765 // Entry already locked, need to throw exception
748 766 bind(exception);
749 767
750 768 if (throw_monitor_exception) {
751 769 // Throw exception
752 770 MacroAssembler::call_VM(noreg,
753 771 CAST_FROM_FN_PTR(address, InterpreterRuntime::
754 772 throw_illegal_monitor_state_exception));
755 773 should_not_reach_here();
756 774 } else {
757 775 // Stack unrolling. Unlock object and install illegal_monitor_exception.
758 776 // Unlock does not block, so don't have to worry about the frame.
759 777 // We don't have to preserve c_rarg1 since we are going to throw an exception.
760 778
761 779 push(state);
762 780 unlock_object(c_rarg1);
763 781 pop(state);
764 782
765 783 if (install_monitor_exception) {
766 784 call_VM(noreg, CAST_FROM_FN_PTR(address,
767 785 InterpreterRuntime::
768 786 new_illegal_monitor_state_exception));
769 787 }
770 788
771 789 jmp(restart);
772 790 }
773 791
774 792 bind(loop);
775 793 // check if current entry is used
776 794 cmpptr(Address(c_rarg1, BasicObjectLock::obj_offset_in_bytes()), (int32_t) NULL);
777 795 jcc(Assembler::notEqual, exception);
778 796
779 797 addptr(c_rarg1, entry_size); // otherwise advance to next entry
780 798 bind(entry);
781 799 cmpptr(c_rarg1, rbx); // check if bottom reached
782 800 jcc(Assembler::notEqual, loop); // if not at bottom then check this entry
783 801 }
784 802
785 803 bind(no_unlock);
786 804
787 805 // jvmti support
788 806 if (notify_jvmdi) {
789 807 notify_method_exit(state, NotifyJVMTI); // preserve TOSCA
790 808 } else {
791 809 notify_method_exit(state, SkipNotifyJVMTI); // preserve TOSCA
792 810 }
793 811
794 812 // remove activation
795 813 // get sender sp
796 814 movptr(rbx,
797 815 Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize));
798 816 leave(); // remove frame anchor
799 817 pop(ret_addr); // get return address
800 818 mov(rsp, rbx); // set sp to sender sp
801 819 }
802 820
803 821 #endif // C_INTERP
804 822
805 823 // Lock object
806 824 //
807 825 // Args:
808 826 // c_rarg1: BasicObjectLock to be used for locking
809 827 //
810 828 // Kills:
811 829 // rax
812 830 // c_rarg0, c_rarg1, c_rarg2, c_rarg3, .. (param regs)
813 831 // rscratch1, rscratch2 (scratch regs)
814 832 void InterpreterMacroAssembler::lock_object(Register lock_reg) {
815 833 assert(lock_reg == c_rarg1, "The argument is only for looks. It must be c_rarg1");
816 834
817 835 if (UseHeavyMonitors) {
818 836 call_VM(noreg,
819 837 CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
820 838 lock_reg);
821 839 } else {
822 840 Label done;
823 841
824 842 const Register swap_reg = rax; // Must use rax for cmpxchg instruction
825 843 const Register obj_reg = c_rarg3; // Will contain the oop
826 844
827 845 const int obj_offset = BasicObjectLock::obj_offset_in_bytes();
828 846 const int lock_offset = BasicObjectLock::lock_offset_in_bytes ();
829 847 const int mark_offset = lock_offset +
830 848 BasicLock::displaced_header_offset_in_bytes();
831 849
832 850 Label slow_case;
833 851
834 852 // Load object pointer into obj_reg %c_rarg3
835 853 movptr(obj_reg, Address(lock_reg, obj_offset));
836 854
837 855 if (UseBiasedLocking) {
838 856 biased_locking_enter(lock_reg, obj_reg, swap_reg, rscratch1, false, done, &slow_case);
839 857 }
840 858
841 859 // Load immediate 1 into swap_reg %rax
842 860 movl(swap_reg, 1);
843 861
844 862 // Load (object->mark() | 1) into swap_reg %rax
845 863 orptr(swap_reg, Address(obj_reg, 0));
846 864
847 865 // Save (object->mark() | 1) into BasicLock's displaced header
848 866 movptr(Address(lock_reg, mark_offset), swap_reg);
849 867
850 868 assert(lock_offset == 0,
851 869 "displached header must be first word in BasicObjectLock");
852 870
853 871 if (os::is_MP()) lock();
854 872 cmpxchgptr(lock_reg, Address(obj_reg, 0));
855 873 if (PrintBiasedLockingStatistics) {
856 874 cond_inc32(Assembler::zero,
857 875 ExternalAddress((address) BiasedLocking::fast_path_entry_count_addr()));
858 876 }
859 877 jcc(Assembler::zero, done);
860 878
861 879 // Test if the oopMark is an obvious stack pointer, i.e.,
862 880 // 1) (mark & 7) == 0, and
863 881 // 2) rsp <= mark < mark + os::pagesize()
864 882 //
865 883 // These 3 tests can be done by evaluating the following
866 884 // expression: ((mark - rsp) & (7 - os::vm_page_size())),
867 885 // assuming both stack pointer and pagesize have their
868 886 // least significant 3 bits clear.
869 887 // NOTE: the oopMark is in swap_reg %rax as the result of cmpxchg
870 888 subptr(swap_reg, rsp);
871 889 andptr(swap_reg, 7 - os::vm_page_size());
872 890
873 891 // Save the test result, for recursive case, the result is zero
874 892 movptr(Address(lock_reg, mark_offset), swap_reg);
875 893
876 894 if (PrintBiasedLockingStatistics) {
877 895 cond_inc32(Assembler::zero,
878 896 ExternalAddress((address) BiasedLocking::fast_path_entry_count_addr()));
879 897 }
880 898 jcc(Assembler::zero, done);
881 899
882 900 bind(slow_case);
883 901
884 902 // Call the runtime routine for slow case
885 903 call_VM(noreg,
886 904 CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
887 905 lock_reg);
888 906
889 907 bind(done);
890 908 }
891 909 }
892 910
893 911
894 912 // Unlocks an object. Used in monitorexit bytecode and
895 913 // remove_activation. Throws an IllegalMonitorException if object is
896 914 // not locked by current thread.
897 915 //
898 916 // Args:
899 917 // c_rarg1: BasicObjectLock for lock
900 918 //
901 919 // Kills:
902 920 // rax
903 921 // c_rarg0, c_rarg1, c_rarg2, c_rarg3, ... (param regs)
904 922 // rscratch1, rscratch2 (scratch regs)
905 923 void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
906 924 assert(lock_reg == c_rarg1, "The argument is only for looks. It must be rarg1");
907 925
908 926 if (UseHeavyMonitors) {
909 927 call_VM(noreg,
910 928 CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit),
911 929 lock_reg);
912 930 } else {
913 931 Label done;
914 932
915 933 const Register swap_reg = rax; // Must use rax for cmpxchg instruction
916 934 const Register header_reg = c_rarg2; // Will contain the old oopMark
917 935 const Register obj_reg = c_rarg3; // Will contain the oop
918 936
919 937 save_bcp(); // Save in case of exception
920 938
921 939 // Convert from BasicObjectLock structure to object and BasicLock
922 940 // structure Store the BasicLock address into %rax
923 941 lea(swap_reg, Address(lock_reg, BasicObjectLock::lock_offset_in_bytes()));
924 942
925 943 // Load oop into obj_reg(%c_rarg3)
926 944 movptr(obj_reg, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()));
927 945
928 946 // Free entry
929 947 movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), (int32_t)NULL_WORD);
930 948
931 949 if (UseBiasedLocking) {
932 950 biased_locking_exit(obj_reg, header_reg, done);
933 951 }
934 952
935 953 // Load the old header from BasicLock structure
936 954 movptr(header_reg, Address(swap_reg,
937 955 BasicLock::displaced_header_offset_in_bytes()));
938 956
939 957 // Test for recursion
940 958 testptr(header_reg, header_reg);
941 959
942 960 // zero for recursive case
943 961 jcc(Assembler::zero, done);
944 962
945 963 // Atomic swap back the old header
946 964 if (os::is_MP()) lock();
947 965 cmpxchgptr(header_reg, Address(obj_reg, 0));
948 966
949 967 // zero for recursive case
950 968 jcc(Assembler::zero, done);
951 969
952 970 // Call the runtime routine for slow case.
953 971 movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()),
954 972 obj_reg); // restore obj
955 973 call_VM(noreg,
956 974 CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit),
957 975 lock_reg);
958 976
959 977 bind(done);
960 978
961 979 restore_bcp();
962 980 }
963 981 }
964 982
965 983 #ifndef CC_INTERP
966 984
967 985 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
968 986 Label& zero_continue) {
969 987 assert(ProfileInterpreter, "must be profiling interpreter");
970 988 movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
971 989 testptr(mdp, mdp);
972 990 jcc(Assembler::zero, zero_continue);
973 991 }
974 992
975 993
976 994 // Set the method data pointer for the current bcp.
977 995 void InterpreterMacroAssembler::set_method_data_pointer_for_bcp() {
978 996 assert(ProfileInterpreter, "must be profiling interpreter");
979 997 Label zero_continue;
980 998 push(rax);
981 999 push(rbx);
982 1000
983 1001 get_method(rbx);
984 1002 // Test MDO to avoid the call if it is NULL.
985 1003 movptr(rax, Address(rbx, in_bytes(methodOopDesc::method_data_offset())));
986 1004 testptr(rax, rax);
987 1005 jcc(Assembler::zero, zero_continue);
988 1006
989 1007 // rbx: method
990 1008 // r13: bcp
991 1009 call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::bcp_to_di), rbx, r13);
992 1010 // rax: mdi
993 1011
994 1012 movptr(rbx, Address(rbx, in_bytes(methodOopDesc::method_data_offset())));
995 1013 testptr(rbx, rbx);
996 1014 jcc(Assembler::zero, zero_continue);
997 1015 addptr(rbx, in_bytes(methodDataOopDesc::data_offset()));
998 1016 addptr(rbx, rax);
999 1017 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rbx);
1000 1018
1001 1019 bind(zero_continue);
1002 1020 pop(rbx);
1003 1021 pop(rax);
1004 1022 }
1005 1023
1006 1024 void InterpreterMacroAssembler::verify_method_data_pointer() {
1007 1025 assert(ProfileInterpreter, "must be profiling interpreter");
1008 1026 #ifdef ASSERT
1009 1027 Label verify_continue;
1010 1028 push(rax);
1011 1029 push(rbx);
1012 1030 push(c_rarg3);
1013 1031 push(c_rarg2);
1014 1032 test_method_data_pointer(c_rarg3, verify_continue); // If mdp is zero, continue
1015 1033 get_method(rbx);
1016 1034
1017 1035 // If the mdp is valid, it will point to a DataLayout header which is
1018 1036 // consistent with the bcp. The converse is highly probable also.
1019 1037 load_unsigned_short(c_rarg2,
1020 1038 Address(c_rarg3, in_bytes(DataLayout::bci_offset())));
1021 1039 addptr(c_rarg2, Address(rbx, methodOopDesc::const_offset()));
1022 1040 lea(c_rarg2, Address(c_rarg2, constMethodOopDesc::codes_offset()));
1023 1041 cmpptr(c_rarg2, r13);
1024 1042 jcc(Assembler::equal, verify_continue);
1025 1043 // rbx: method
1026 1044 // r13: bcp
1027 1045 // c_rarg3: mdp
1028 1046 call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::verify_mdp),
1029 1047 rbx, r13, c_rarg3);
1030 1048 bind(verify_continue);
1031 1049 pop(c_rarg2);
1032 1050 pop(c_rarg3);
1033 1051 pop(rbx);
1034 1052 pop(rax);
1035 1053 #endif // ASSERT
1036 1054 }
1037 1055
1038 1056
1039 1057 void InterpreterMacroAssembler::set_mdp_data_at(Register mdp_in,
1040 1058 int constant,
1041 1059 Register value) {
1042 1060 assert(ProfileInterpreter, "must be profiling interpreter");
1043 1061 Address data(mdp_in, constant);
1044 1062 movptr(data, value);
1045 1063 }
1046 1064
1047 1065
1048 1066 void InterpreterMacroAssembler::increment_mdp_data_at(Register mdp_in,
1049 1067 int constant,
1050 1068 bool decrement) {
1051 1069 // Counter address
1052 1070 Address data(mdp_in, constant);
1053 1071
1054 1072 increment_mdp_data_at(data, decrement);
1055 1073 }
1056 1074
1057 1075 void InterpreterMacroAssembler::increment_mdp_data_at(Address data,
1058 1076 bool decrement) {
1059 1077 assert(ProfileInterpreter, "must be profiling interpreter");
1060 1078 // %%% this does 64bit counters at best it is wasting space
1061 1079 // at worst it is a rare bug when counters overflow
1062 1080
1063 1081 if (decrement) {
1064 1082 // Decrement the register. Set condition codes.
1065 1083 addptr(data, (int32_t) -DataLayout::counter_increment);
1066 1084 // If the decrement causes the counter to overflow, stay negative
1067 1085 Label L;
1068 1086 jcc(Assembler::negative, L);
1069 1087 addptr(data, (int32_t) DataLayout::counter_increment);
1070 1088 bind(L);
1071 1089 } else {
1072 1090 assert(DataLayout::counter_increment == 1,
1073 1091 "flow-free idiom only works with 1");
1074 1092 // Increment the register. Set carry flag.
1075 1093 addptr(data, DataLayout::counter_increment);
1076 1094 // If the increment causes the counter to overflow, pull back by 1.
1077 1095 sbbptr(data, (int32_t)0);
1078 1096 }
1079 1097 }
1080 1098
1081 1099
1082 1100 void InterpreterMacroAssembler::increment_mdp_data_at(Register mdp_in,
1083 1101 Register reg,
1084 1102 int constant,
1085 1103 bool decrement) {
1086 1104 Address data(mdp_in, reg, Address::times_1, constant);
1087 1105
1088 1106 increment_mdp_data_at(data, decrement);
1089 1107 }
1090 1108
1091 1109 void InterpreterMacroAssembler::set_mdp_flag_at(Register mdp_in,
1092 1110 int flag_byte_constant) {
1093 1111 assert(ProfileInterpreter, "must be profiling interpreter");
1094 1112 int header_offset = in_bytes(DataLayout::header_offset());
1095 1113 int header_bits = DataLayout::flag_mask_to_header_mask(flag_byte_constant);
1096 1114 // Set the flag
1097 1115 orl(Address(mdp_in, header_offset), header_bits);
1098 1116 }
1099 1117
1100 1118
1101 1119
1102 1120 void InterpreterMacroAssembler::test_mdp_data_at(Register mdp_in,
1103 1121 int offset,
1104 1122 Register value,
1105 1123 Register test_value_out,
1106 1124 Label& not_equal_continue) {
1107 1125 assert(ProfileInterpreter, "must be profiling interpreter");
1108 1126 if (test_value_out == noreg) {
1109 1127 cmpptr(value, Address(mdp_in, offset));
1110 1128 } else {
1111 1129 // Put the test value into a register, so caller can use it:
1112 1130 movptr(test_value_out, Address(mdp_in, offset));
1113 1131 cmpptr(test_value_out, value);
1114 1132 }
1115 1133 jcc(Assembler::notEqual, not_equal_continue);
1116 1134 }
1117 1135
1118 1136
1119 1137 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
1120 1138 int offset_of_disp) {
1121 1139 assert(ProfileInterpreter, "must be profiling interpreter");
1122 1140 Address disp_address(mdp_in, offset_of_disp);
1123 1141 addptr(mdp_in, disp_address);
1124 1142 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
1125 1143 }
1126 1144
1127 1145
1128 1146 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
1129 1147 Register reg,
1130 1148 int offset_of_disp) {
1131 1149 assert(ProfileInterpreter, "must be profiling interpreter");
1132 1150 Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
1133 1151 addptr(mdp_in, disp_address);
1134 1152 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
1135 1153 }
1136 1154
1137 1155
1138 1156 void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in,
1139 1157 int constant) {
1140 1158 assert(ProfileInterpreter, "must be profiling interpreter");
1141 1159 addptr(mdp_in, constant);
1142 1160 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
1143 1161 }
1144 1162
1145 1163
1146 1164 void InterpreterMacroAssembler::update_mdp_for_ret(Register return_bci) {
1147 1165 assert(ProfileInterpreter, "must be profiling interpreter");
1148 1166 push(return_bci); // save/restore across call_VM
1149 1167 call_VM(noreg,
1150 1168 CAST_FROM_FN_PTR(address, InterpreterRuntime::update_mdp_for_ret),
1151 1169 return_bci);
1152 1170 pop(return_bci);
1153 1171 }
1154 1172
1155 1173
1156 1174 void InterpreterMacroAssembler::profile_taken_branch(Register mdp,
1157 1175 Register bumped_count) {
1158 1176 if (ProfileInterpreter) {
1159 1177 Label profile_continue;
1160 1178
1161 1179 // If no method data exists, go to profile_continue.
1162 1180 // Otherwise, assign to mdp
1163 1181 test_method_data_pointer(mdp, profile_continue);
1164 1182
1165 1183 // We are taking a branch. Increment the taken count.
1166 1184 // We inline increment_mdp_data_at to return bumped_count in a register
1167 1185 //increment_mdp_data_at(mdp, in_bytes(JumpData::taken_offset()));
1168 1186 Address data(mdp, in_bytes(JumpData::taken_offset()));
1169 1187 movptr(bumped_count, data);
1170 1188 assert(DataLayout::counter_increment == 1,
1171 1189 "flow-free idiom only works with 1");
1172 1190 addptr(bumped_count, DataLayout::counter_increment);
1173 1191 sbbptr(bumped_count, 0);
1174 1192 movptr(data, bumped_count); // Store back out
1175 1193
1176 1194 // The method data pointer needs to be updated to reflect the new target.
1177 1195 update_mdp_by_offset(mdp, in_bytes(JumpData::displacement_offset()));
1178 1196 bind(profile_continue);
1179 1197 }
1180 1198 }
1181 1199
1182 1200
1183 1201 void InterpreterMacroAssembler::profile_not_taken_branch(Register mdp) {
1184 1202 if (ProfileInterpreter) {
1185 1203 Label profile_continue;
1186 1204
1187 1205 // If no method data exists, go to profile_continue.
1188 1206 test_method_data_pointer(mdp, profile_continue);
1189 1207
1190 1208 // We are taking a branch. Increment the not taken count.
1191 1209 increment_mdp_data_at(mdp, in_bytes(BranchData::not_taken_offset()));
1192 1210
1193 1211 // The method data pointer needs to be updated to correspond to
1194 1212 // the next bytecode
1195 1213 update_mdp_by_constant(mdp, in_bytes(BranchData::branch_data_size()));
1196 1214 bind(profile_continue);
1197 1215 }
1198 1216 }
1199 1217
1200 1218
1201 1219 void InterpreterMacroAssembler::profile_call(Register mdp) {
1202 1220 if (ProfileInterpreter) {
1203 1221 Label profile_continue;
1204 1222
1205 1223 // If no method data exists, go to profile_continue.
1206 1224 test_method_data_pointer(mdp, profile_continue);
1207 1225
1208 1226 // We are making a call. Increment the count.
1209 1227 increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset()));
1210 1228
1211 1229 // The method data pointer needs to be updated to reflect the new target.
1212 1230 update_mdp_by_constant(mdp, in_bytes(CounterData::counter_data_size()));
1213 1231 bind(profile_continue);
1214 1232 }
1215 1233 }
1216 1234
1217 1235
1218 1236 void InterpreterMacroAssembler::profile_final_call(Register mdp) {
1219 1237 if (ProfileInterpreter) {
1220 1238 Label profile_continue;
1221 1239
1222 1240 // If no method data exists, go to profile_continue.
1223 1241 test_method_data_pointer(mdp, profile_continue);
1224 1242
1225 1243 // We are making a call. Increment the count.
1226 1244 increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset()));
1227 1245
1228 1246 // The method data pointer needs to be updated to reflect the new target.
↓ open down ↓ |
1012 lines elided |
↑ open up ↑ |
1229 1247 update_mdp_by_constant(mdp,
1230 1248 in_bytes(VirtualCallData::
1231 1249 virtual_call_data_size()));
1232 1250 bind(profile_continue);
1233 1251 }
1234 1252 }
1235 1253
1236 1254
1237 1255 void InterpreterMacroAssembler::profile_virtual_call(Register receiver,
1238 1256 Register mdp,
1239 - Register reg2) {
1257 + Register reg2,
1258 + bool receiver_can_be_null) {
1240 1259 if (ProfileInterpreter) {
1241 1260 Label profile_continue;
1242 1261
1243 1262 // If no method data exists, go to profile_continue.
1244 1263 test_method_data_pointer(mdp, profile_continue);
1245 1264
1246 1265 // We are making a call. Increment the count.
1247 1266 increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset()));
1248 1267
1268 + Label skip_receiver_profile;
1269 + if (receiver_can_be_null) {
1270 + testptr(receiver, receiver);
1271 + jcc(Assembler::zero, skip_receiver_profile);
1272 + }
1273 +
1249 1274 // Record the receiver type.
1250 1275 record_klass_in_profile(receiver, mdp, reg2);
1276 + bind(skip_receiver_profile);
1251 1277
1252 1278 // The method data pointer needs to be updated to reflect the new target.
1253 1279 update_mdp_by_constant(mdp,
1254 1280 in_bytes(VirtualCallData::
1255 1281 virtual_call_data_size()));
1256 1282 bind(profile_continue);
1257 1283 }
1258 1284 }
1259 1285
1260 1286 // This routine creates a state machine for updating the multi-row
1261 1287 // type profile at a virtual call site (or other type-sensitive bytecode).
1262 1288 // The machine visits each row (of receiver/count) until the receiver type
1263 1289 // is found, or until it runs out of rows. At the same time, it remembers
1264 1290 // the location of the first empty row. (An empty row records null for its
1265 1291 // receiver, and can be allocated for a newly-observed receiver type.)
1266 1292 // Because there are two degrees of freedom in the state, a simple linear
1267 1293 // search will not work; it must be a decision tree. Hence this helper
1268 1294 // function is recursive, to generate the required tree structured code.
1269 1295 // It's the interpreter, so we are trading off code space for speed.
1270 1296 // See below for example code.
1271 1297 void InterpreterMacroAssembler::record_klass_in_profile_helper(
1272 1298 Register receiver, Register mdp,
1273 1299 Register reg2,
1274 1300 int start_row, Label& done) {
1275 1301 if (TypeProfileWidth == 0)
1276 1302 return;
1277 1303
1278 1304 int last_row = VirtualCallData::row_limit() - 1;
1279 1305 assert(start_row <= last_row, "must be work left to do");
1280 1306 // Test this row for both the receiver and for null.
1281 1307 // Take any of three different outcomes:
1282 1308 // 1. found receiver => increment count and goto done
1283 1309 // 2. found null => keep looking for case 1, maybe allocate this cell
1284 1310 // 3. found something else => keep looking for cases 1 and 2
1285 1311 // Case 3 is handled by a recursive call.
1286 1312 for (int row = start_row; row <= last_row; row++) {
1287 1313 Label next_test;
1288 1314 bool test_for_null_also = (row == start_row);
1289 1315
1290 1316 // See if the receiver is receiver[n].
1291 1317 int recvr_offset = in_bytes(VirtualCallData::receiver_offset(row));
1292 1318 test_mdp_data_at(mdp, recvr_offset, receiver,
1293 1319 (test_for_null_also ? reg2 : noreg),
1294 1320 next_test);
1295 1321 // (Reg2 now contains the receiver from the CallData.)
1296 1322
1297 1323 // The receiver is receiver[n]. Increment count[n].
1298 1324 int count_offset = in_bytes(VirtualCallData::receiver_count_offset(row));
1299 1325 increment_mdp_data_at(mdp, count_offset);
1300 1326 jmp(done);
1301 1327 bind(next_test);
1302 1328
1303 1329 if (test_for_null_also) {
1304 1330 // Failed the equality check on receiver[n]... Test for null.
1305 1331 testptr(reg2, reg2);
1306 1332 if (start_row == last_row) {
1307 1333 // The only thing left to do is handle the null case.
1308 1334 jcc(Assembler::notZero, done);
1309 1335 break;
1310 1336 }
1311 1337 // Since null is rare, make it be the branch-taken case.
1312 1338 Label found_null;
1313 1339 jcc(Assembler::zero, found_null);
1314 1340
1315 1341 // Put all the "Case 3" tests here.
1316 1342 record_klass_in_profile_helper(receiver, mdp, reg2, start_row + 1, done);
1317 1343
1318 1344 // Found a null. Keep searching for a matching receiver,
1319 1345 // but remember that this is an empty (unused) slot.
1320 1346 bind(found_null);
1321 1347 }
1322 1348 }
1323 1349
1324 1350 // In the fall-through case, we found no matching receiver, but we
1325 1351 // observed the receiver[start_row] is NULL.
1326 1352
1327 1353 // Fill in the receiver field and increment the count.
1328 1354 int recvr_offset = in_bytes(VirtualCallData::receiver_offset(start_row));
1329 1355 set_mdp_data_at(mdp, recvr_offset, receiver);
1330 1356 int count_offset = in_bytes(VirtualCallData::receiver_count_offset(start_row));
1331 1357 movl(reg2, DataLayout::counter_increment);
1332 1358 set_mdp_data_at(mdp, count_offset, reg2);
1333 1359 jmp(done);
1334 1360 }
1335 1361
1336 1362 // Example state machine code for three profile rows:
1337 1363 // // main copy of decision tree, rooted at row[1]
1338 1364 // if (row[0].rec == rec) { row[0].incr(); goto done; }
1339 1365 // if (row[0].rec != NULL) {
1340 1366 // // inner copy of decision tree, rooted at row[1]
1341 1367 // if (row[1].rec == rec) { row[1].incr(); goto done; }
1342 1368 // if (row[1].rec != NULL) {
1343 1369 // // degenerate decision tree, rooted at row[2]
1344 1370 // if (row[2].rec == rec) { row[2].incr(); goto done; }
1345 1371 // if (row[2].rec != NULL) { goto done; } // overflow
1346 1372 // row[2].init(rec); goto done;
1347 1373 // } else {
1348 1374 // // remember row[1] is empty
1349 1375 // if (row[2].rec == rec) { row[2].incr(); goto done; }
1350 1376 // row[1].init(rec); goto done;
1351 1377 // }
1352 1378 // } else {
1353 1379 // // remember row[0] is empty
1354 1380 // if (row[1].rec == rec) { row[1].incr(); goto done; }
1355 1381 // if (row[2].rec == rec) { row[2].incr(); goto done; }
1356 1382 // row[0].init(rec); goto done;
1357 1383 // }
1358 1384
1359 1385 void InterpreterMacroAssembler::record_klass_in_profile(Register receiver,
1360 1386 Register mdp,
1361 1387 Register reg2) {
1362 1388 assert(ProfileInterpreter, "must be profiling");
1363 1389 Label done;
1364 1390
1365 1391 record_klass_in_profile_helper(receiver, mdp, reg2, 0, done);
1366 1392
1367 1393 bind (done);
1368 1394 }
1369 1395
1370 1396 void InterpreterMacroAssembler::profile_ret(Register return_bci,
1371 1397 Register mdp) {
1372 1398 if (ProfileInterpreter) {
1373 1399 Label profile_continue;
1374 1400 uint row;
1375 1401
1376 1402 // If no method data exists, go to profile_continue.
1377 1403 test_method_data_pointer(mdp, profile_continue);
1378 1404
1379 1405 // Update the total ret count.
1380 1406 increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset()));
1381 1407
1382 1408 for (row = 0; row < RetData::row_limit(); row++) {
1383 1409 Label next_test;
1384 1410
1385 1411 // See if return_bci is equal to bci[n]:
1386 1412 test_mdp_data_at(mdp,
1387 1413 in_bytes(RetData::bci_offset(row)),
1388 1414 return_bci, noreg,
1389 1415 next_test);
1390 1416
1391 1417 // return_bci is equal to bci[n]. Increment the count.
1392 1418 increment_mdp_data_at(mdp, in_bytes(RetData::bci_count_offset(row)));
1393 1419
1394 1420 // The method data pointer needs to be updated to reflect the new target.
1395 1421 update_mdp_by_offset(mdp,
1396 1422 in_bytes(RetData::bci_displacement_offset(row)));
1397 1423 jmp(profile_continue);
1398 1424 bind(next_test);
1399 1425 }
1400 1426
1401 1427 update_mdp_for_ret(return_bci);
1402 1428
1403 1429 bind(profile_continue);
1404 1430 }
1405 1431 }
1406 1432
1407 1433
1408 1434 void InterpreterMacroAssembler::profile_null_seen(Register mdp) {
1409 1435 if (ProfileInterpreter) {
1410 1436 Label profile_continue;
1411 1437
1412 1438 // If no method data exists, go to profile_continue.
1413 1439 test_method_data_pointer(mdp, profile_continue);
1414 1440
1415 1441 set_mdp_flag_at(mdp, BitData::null_seen_byte_constant());
1416 1442
1417 1443 // The method data pointer needs to be updated.
1418 1444 int mdp_delta = in_bytes(BitData::bit_data_size());
1419 1445 if (TypeProfileCasts) {
1420 1446 mdp_delta = in_bytes(VirtualCallData::virtual_call_data_size());
1421 1447 }
1422 1448 update_mdp_by_constant(mdp, mdp_delta);
1423 1449
1424 1450 bind(profile_continue);
1425 1451 }
1426 1452 }
1427 1453
1428 1454
1429 1455 void InterpreterMacroAssembler::profile_typecheck_failed(Register mdp) {
1430 1456 if (ProfileInterpreter && TypeProfileCasts) {
1431 1457 Label profile_continue;
1432 1458
1433 1459 // If no method data exists, go to profile_continue.
1434 1460 test_method_data_pointer(mdp, profile_continue);
1435 1461
1436 1462 int count_offset = in_bytes(CounterData::count_offset());
1437 1463 // Back up the address, since we have already bumped the mdp.
1438 1464 count_offset -= in_bytes(VirtualCallData::virtual_call_data_size());
1439 1465
1440 1466 // *Decrement* the counter. We expect to see zero or small negatives.
1441 1467 increment_mdp_data_at(mdp, count_offset, true);
1442 1468
1443 1469 bind (profile_continue);
1444 1470 }
1445 1471 }
1446 1472
1447 1473
1448 1474 void InterpreterMacroAssembler::profile_typecheck(Register mdp, Register klass, Register reg2) {
1449 1475 if (ProfileInterpreter) {
1450 1476 Label profile_continue;
1451 1477
1452 1478 // If no method data exists, go to profile_continue.
1453 1479 test_method_data_pointer(mdp, profile_continue);
1454 1480
1455 1481 // The method data pointer needs to be updated.
1456 1482 int mdp_delta = in_bytes(BitData::bit_data_size());
1457 1483 if (TypeProfileCasts) {
1458 1484 mdp_delta = in_bytes(VirtualCallData::virtual_call_data_size());
1459 1485
1460 1486 // Record the object type.
1461 1487 record_klass_in_profile(klass, mdp, reg2);
1462 1488 }
1463 1489 update_mdp_by_constant(mdp, mdp_delta);
1464 1490
1465 1491 bind(profile_continue);
1466 1492 }
1467 1493 }
1468 1494
1469 1495
1470 1496 void InterpreterMacroAssembler::profile_switch_default(Register mdp) {
1471 1497 if (ProfileInterpreter) {
1472 1498 Label profile_continue;
1473 1499
1474 1500 // If no method data exists, go to profile_continue.
1475 1501 test_method_data_pointer(mdp, profile_continue);
1476 1502
1477 1503 // Update the default case count
1478 1504 increment_mdp_data_at(mdp,
1479 1505 in_bytes(MultiBranchData::default_count_offset()));
1480 1506
1481 1507 // The method data pointer needs to be updated.
1482 1508 update_mdp_by_offset(mdp,
1483 1509 in_bytes(MultiBranchData::
1484 1510 default_displacement_offset()));
1485 1511
1486 1512 bind(profile_continue);
1487 1513 }
1488 1514 }
1489 1515
1490 1516
1491 1517 void InterpreterMacroAssembler::profile_switch_case(Register index,
1492 1518 Register mdp,
1493 1519 Register reg2) {
1494 1520 if (ProfileInterpreter) {
1495 1521 Label profile_continue;
1496 1522
1497 1523 // If no method data exists, go to profile_continue.
1498 1524 test_method_data_pointer(mdp, profile_continue);
1499 1525
1500 1526 // Build the base (index * per_case_size_in_bytes()) +
1501 1527 // case_array_offset_in_bytes()
1502 1528 movl(reg2, in_bytes(MultiBranchData::per_case_size()));
1503 1529 imulptr(index, reg2); // XXX l ?
1504 1530 addptr(index, in_bytes(MultiBranchData::case_array_offset())); // XXX l ?
1505 1531
1506 1532 // Update the case count
1507 1533 increment_mdp_data_at(mdp,
1508 1534 index,
1509 1535 in_bytes(MultiBranchData::relative_count_offset()));
1510 1536
1511 1537 // The method data pointer needs to be updated.
1512 1538 update_mdp_by_offset(mdp,
1513 1539 index,
1514 1540 in_bytes(MultiBranchData::
1515 1541 relative_displacement_offset()));
1516 1542
1517 1543 bind(profile_continue);
1518 1544 }
1519 1545 }
1520 1546
1521 1547
1522 1548
1523 1549 void InterpreterMacroAssembler::verify_oop(Register reg, TosState state) {
1524 1550 if (state == atos) {
1525 1551 MacroAssembler::verify_oop(reg);
1526 1552 }
1527 1553 }
1528 1554
1529 1555 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
1530 1556 }
1531 1557 #endif // !CC_INTERP
1532 1558
1533 1559
1534 1560 void InterpreterMacroAssembler::notify_method_entry() {
1535 1561 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
1536 1562 // track stack depth. If it is possible to enter interp_only_mode we add
1537 1563 // the code to check if the event should be sent.
1538 1564 if (JvmtiExport::can_post_interpreter_events()) {
1539 1565 Label L;
1540 1566 movl(rdx, Address(r15_thread, JavaThread::interp_only_mode_offset()));
1541 1567 testl(rdx, rdx);
1542 1568 jcc(Assembler::zero, L);
1543 1569 call_VM(noreg, CAST_FROM_FN_PTR(address,
1544 1570 InterpreterRuntime::post_method_entry));
1545 1571 bind(L);
1546 1572 }
1547 1573
1548 1574 {
1549 1575 SkipIfEqual skip(this, &DTraceMethodProbes, false);
1550 1576 get_method(c_rarg1);
1551 1577 call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry),
1552 1578 r15_thread, c_rarg1);
1553 1579 }
1554 1580
1555 1581 // RedefineClasses() tracing support for obsolete method entry
1556 1582 if (RC_TRACE_IN_RANGE(0x00001000, 0x00002000)) {
1557 1583 get_method(c_rarg1);
1558 1584 call_VM_leaf(
1559 1585 CAST_FROM_FN_PTR(address, SharedRuntime::rc_trace_method_entry),
1560 1586 r15_thread, c_rarg1);
1561 1587 }
1562 1588 }
1563 1589
1564 1590
1565 1591 void InterpreterMacroAssembler::notify_method_exit(
1566 1592 TosState state, NotifyMethodExitMode mode) {
1567 1593 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
1568 1594 // track stack depth. If it is possible to enter interp_only_mode we add
1569 1595 // the code to check if the event should be sent.
1570 1596 if (mode == NotifyJVMTI && JvmtiExport::can_post_interpreter_events()) {
1571 1597 Label L;
1572 1598 // Note: frame::interpreter_frame_result has a dependency on how the
1573 1599 // method result is saved across the call to post_method_exit. If this
1574 1600 // is changed then the interpreter_frame_result implementation will
1575 1601 // need to be updated too.
1576 1602
1577 1603 // For c++ interpreter the result is always stored at a known location in the frame
1578 1604 // template interpreter will leave it on the top of the stack.
1579 1605 NOT_CC_INTERP(push(state);)
1580 1606 movl(rdx, Address(r15_thread, JavaThread::interp_only_mode_offset()));
1581 1607 testl(rdx, rdx);
1582 1608 jcc(Assembler::zero, L);
1583 1609 call_VM(noreg,
1584 1610 CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_exit));
1585 1611 bind(L);
1586 1612 NOT_CC_INTERP(pop(state));
1587 1613 }
1588 1614
1589 1615 {
1590 1616 SkipIfEqual skip(this, &DTraceMethodProbes, false);
1591 1617 NOT_CC_INTERP(push(state));
1592 1618 get_method(c_rarg1);
1593 1619 call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
1594 1620 r15_thread, c_rarg1);
1595 1621 NOT_CC_INTERP(pop(state));
1596 1622 }
1597 1623 }
↓ open down ↓ |
337 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX