src/cpu/x86/vm/templateTable_x86_32.cpp

changeset 1957
136b78722a08
parent 1934
e9ff18c4ace7
child 2036
126ea7725993
equal deleted inserted replaced
1940:49fac4acd688 1957:136b78722a08
371 371
372 if (VerifyOops) { 372 if (VerifyOops) {
373 __ verify_oop(rax); 373 __ verify_oop(rax);
374 } 374 }
375 __ bind(Done); 375 __ bind(Done);
376 }
377
378 // Fast path for caching oop constants.
379 // %%% We should use this to handle Class and String constants also.
380 // %%% It will simplify the ldc/primitive path considerably.
381 void TemplateTable::fast_aldc(bool wide) {
382 transition(vtos, atos);
383
384 if (!EnableMethodHandles) {
385 // We should not encounter this bytecode if !EnableMethodHandles.
386 // The verifier will stop it. However, if we get past the verifier,
387 // this will stop the thread in a reasonable way, without crashing the JVM.
388 __ call_VM(noreg, CAST_FROM_FN_PTR(address,
389 InterpreterRuntime::throw_IncompatibleClassChangeError));
390 // the call_VM checks for exception, so we should never return here.
391 __ should_not_reach_here();
392 return;
393 }
394
395 const Register cache = rcx;
396 const Register index = rdx;
397
398 resolve_cache_and_index(f1_oop, rax, cache, index, wide ? sizeof(u2) : sizeof(u1));
399 if (VerifyOops) {
400 __ verify_oop(rax);
401 }
376 } 402 }
377 403
378 void TemplateTable::ldc2_w() { 404 void TemplateTable::ldc2_w() {
379 transition(vtos, vtos); 405 transition(vtos, vtos);
380 Label Long, Done; 406 Label Long, Done;
2053 case Bytecodes::_invokevirtual : // fall through 2079 case Bytecodes::_invokevirtual : // fall through
2054 case Bytecodes::_invokespecial : // fall through 2080 case Bytecodes::_invokespecial : // fall through
2055 case Bytecodes::_invokestatic : // fall through 2081 case Bytecodes::_invokestatic : // fall through
2056 case Bytecodes::_invokeinterface: entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invoke); break; 2082 case Bytecodes::_invokeinterface: entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invoke); break;
2057 case Bytecodes::_invokedynamic : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invokedynamic); break; 2083 case Bytecodes::_invokedynamic : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_invokedynamic); break;
2084 case Bytecodes::_fast_aldc : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc); break;
2085 case Bytecodes::_fast_aldc_w : entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc); break;
2058 default : ShouldNotReachHere(); break; 2086 default : ShouldNotReachHere(); break;
2059 } 2087 }
2060 __ movl(temp, (int)bytecode()); 2088 __ movl(temp, (int)bytecode());
2061 __ call_VM(noreg, entry, temp); 2089 __ call_VM(noreg, entry, temp);
2062 // Update registers with resolved info 2090 // Update registers with resolved info

mercurial