352 case btos:
353 case ztos:
354 case ctos:
355 case stos:
356 ShouldNotReachHere(); // btos/ctos/stos should use itos.
357 break;
358 case atos: vep = __ pc(); __ pop(atos); aep = __ pc(); generate_and_dispatch(t); break;
359 case itos: vep = __ pc(); __ pop(itos); iep = __ pc(); generate_and_dispatch(t); break;
360 case ltos: vep = __ pc(); __ pop(ltos); lep = __ pc(); generate_and_dispatch(t); break;
361 case ftos: vep = __ pc(); __ pop(ftos); fep = __ pc(); generate_and_dispatch(t); break;
362 case dtos: vep = __ pc(); __ pop(dtos); dep = __ pc(); generate_and_dispatch(t); break;
363 case vtos: set_vtos_entry_points(t, bep, cep, sep, aep, iep, lep, fep, dep, vep); break;
364 default : ShouldNotReachHere(); break;
365 }
366 }
367
368
369 //------------------------------------------------------------------------------------------------------------------------
370
371 void TemplateInterpreterGenerator::generate_and_dispatch(Template* t, TosState tos_out) {
372 #ifndef PRODUCT
373 // debugging code
374 if (CountBytecodes || TraceBytecodes || StopInterpreterAt > 0) count_bytecode();
375 if (PrintBytecodeHistogram) histogram_bytecode(t);
376 if (PrintBytecodePairHistogram) histogram_bytecode_pair(t);
377 if (TraceBytecodes) trace_bytecode(t);
378 if (StopInterpreterAt > 0) stop_interpreter_at();
379 __ verify_FPU(1, t->tos_in());
380 #endif // !PRODUCT
381 int step = 0;
382 if (!t->does_dispatch()) {
383 step = t->is_wide() ? Bytecodes::wide_length_for(t->bytecode()) : Bytecodes::length_for(t->bytecode());
384 if (tos_out == ilgl) tos_out = t->tos_out();
385 // compute bytecode size
386 assert(step > 0, "just checkin'");
387 // setup stuff for dispatching next bytecode
388 if (ProfileInterpreter && VerifyDataPointer
389 && MethodData::bytecode_has_profile(t->bytecode())) {
390 __ verify_method_data_pointer();
391 }
392 __ dispatch_prolog(tos_out, step);
393 }
394 // generate template
395 t->generate(_masm);
|
352 case btos:
353 case ztos:
354 case ctos:
355 case stos:
356 ShouldNotReachHere(); // btos/ctos/stos should use itos.
357 break;
358 case atos: vep = __ pc(); __ pop(atos); aep = __ pc(); generate_and_dispatch(t); break;
359 case itos: vep = __ pc(); __ pop(itos); iep = __ pc(); generate_and_dispatch(t); break;
360 case ltos: vep = __ pc(); __ pop(ltos); lep = __ pc(); generate_and_dispatch(t); break;
361 case ftos: vep = __ pc(); __ pop(ftos); fep = __ pc(); generate_and_dispatch(t); break;
362 case dtos: vep = __ pc(); __ pop(dtos); dep = __ pc(); generate_and_dispatch(t); break;
363 case vtos: set_vtos_entry_points(t, bep, cep, sep, aep, iep, lep, fep, dep, vep); break;
364 default : ShouldNotReachHere(); break;
365 }
366 }
367
368
369 //------------------------------------------------------------------------------------------------------------------------
370
371 void TemplateInterpreterGenerator::generate_and_dispatch(Template* t, TosState tos_out) {
372 if (CountBytecodes || CountBytecodesPerThread || TraceBytecodes || StopInterpreterAt > 0) {
373 count_bytecode();
374 }
375 if (PrintBytecodeHistogram) histogram_bytecode(t);
376 #ifndef PRODUCT
377 // debugging code
378 if (PrintBytecodePairHistogram) histogram_bytecode_pair(t);
379 if (TraceBytecodes) trace_bytecode(t);
380 if (StopInterpreterAt > 0) stop_interpreter_at();
381 __ verify_FPU(1, t->tos_in());
382 #endif // !PRODUCT
383 int step = 0;
384 if (!t->does_dispatch()) {
385 step = t->is_wide() ? Bytecodes::wide_length_for(t->bytecode()) : Bytecodes::length_for(t->bytecode());
386 if (tos_out == ilgl) tos_out = t->tos_out();
387 // compute bytecode size
388 assert(step > 0, "just checkin'");
389 // setup stuff for dispatching next bytecode
390 if (ProfileInterpreter && VerifyDataPointer
391 && MethodData::bytecode_has_profile(t->bytecode())) {
392 __ verify_method_data_pointer();
393 }
394 __ dispatch_prolog(tos_out, step);
395 }
396 // generate template
397 t->generate(_masm);
|