2360 //
2361 // JVMTI ForceEarlyReturn support
2362 //
2363 address TemplateInterpreterGenerator::generate_earlyret_entry_for (TosState state) {
2364 address entry = __ pc();
2365
2366 BLOCK_COMMENT("earlyret_entry {");
2367
2368 __ z_lg(Z_fp, _z_parent_ijava_frame_abi(callers_sp), Z_SP);
2369 __ restore_bcp();
2370 __ restore_locals();
2371 __ restore_esp();
2372 __ empty_expression_stack();
2373 __ load_earlyret_value(state);
2374
2375 Register RjvmtiState = Z_tmp_1;
2376 __ z_lg(RjvmtiState, thread_(jvmti_thread_state));
2377 __ store_const(Address(RjvmtiState, JvmtiThreadState::earlyret_state_offset()),
2378 JvmtiThreadState::earlyret_inactive, 4, 4, Z_R0_scratch);
2379
2380 __ remove_activation(state,
2381 Z_tmp_1, // retaddr
2382 false, // throw_monitor_exception
2383 false, // install_monitor_exception
2384 true); // notify_jvmdi
2385 __ z_br(Z_tmp_1);
2386
2387 BLOCK_COMMENT("} earlyret_entry");
2388
2389 return entry;
2390 }
2391
2392 //-----------------------------------------------------------------------------
2393 // Helper for vtos entry point generation.
2394
2395 void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
2396 address& bep,
2397 address& cep,
2398 address& sep,
2399 address& aep,
|
2360 //
2361 // JVMTI ForceEarlyReturn support
2362 //
2363 address TemplateInterpreterGenerator::generate_earlyret_entry_for (TosState state) {
2364 address entry = __ pc();
2365
2366 BLOCK_COMMENT("earlyret_entry {");
2367
2368 __ z_lg(Z_fp, _z_parent_ijava_frame_abi(callers_sp), Z_SP);
2369 __ restore_bcp();
2370 __ restore_locals();
2371 __ restore_esp();
2372 __ empty_expression_stack();
2373 __ load_earlyret_value(state);
2374
2375 Register RjvmtiState = Z_tmp_1;
2376 __ z_lg(RjvmtiState, thread_(jvmti_thread_state));
2377 __ store_const(Address(RjvmtiState, JvmtiThreadState::earlyret_state_offset()),
2378 JvmtiThreadState::earlyret_inactive, 4, 4, Z_R0_scratch);
2379
2380 if (state == itos) {
2381 // Narrow result if state is itos but result type is smaller.
2382 // Need to narrow in the return bytecode rather than in generate_return_entry
2383 // since compiled code callers expect the result to already be narrowed.
2384 __ narrow(Z_tos, Z_tmp_1); /* fall through */
2385 }
2386 __ remove_activation(state,
2387 Z_tmp_1, // retaddr
2388 false, // throw_monitor_exception
2389 false, // install_monitor_exception
2390 true); // notify_jvmdi
2391 __ z_br(Z_tmp_1);
2392
2393 BLOCK_COMMENT("} earlyret_entry");
2394
2395 return entry;
2396 }
2397
2398 //-----------------------------------------------------------------------------
2399 // Helper for vtos entry point generation.
2400
2401 void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
2402 address& bep,
2403 address& cep,
2404 address& sep,
2405 address& aep,
|