< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page




2425   __ jcc(j_not(cc), not_taken);
2426   branch(false, false);
2427   __ bind(not_taken);
2428   __ profile_not_taken_branch(rax);
2429 }
2430 
2431 void TemplateTable::if_nullcmp(Condition cc) {
2432   transition(atos, vtos);
2433   // assume branch is more often taken than not (loops use backward branches)
2434   Label not_taken;
2435   __ testptr(rax, rax);
2436   __ jcc(j_not(cc), not_taken);
2437   branch(false, false);
2438   __ bind(not_taken);
2439   __ profile_not_taken_branch(rax);
2440 }
2441 
2442 void TemplateTable::if_acmp(Condition cc) {
2443   transition(atos, vtos);
2444   // assume branch is more often taken than not (loops use backward branches)
2445   Label not_taken;
2446   __ pop_ptr(rdx);



















2447   __ cmpoop(rdx, rax);
2448   __ jcc(j_not(cc), not_taken);
2449   branch(false, false);
2450   __ bind(not_taken);
2451   __ profile_not_taken_branch(rax);
2452 }
2453 
2454 void TemplateTable::ret() {
2455   transition(vtos, vtos);
2456   locals_index(rbx);
2457   LP64_ONLY(__ movslq(rbx, iaddress(rbx))); // get return bci, compute return bcp
2458   NOT_LP64(__ movptr(rbx, iaddress(rbx)));
2459   __ profile_ret(rbx, rcx);
2460   __ get_method(rax);
2461   __ movptr(rbcp, Address(rax, Method::const_offset()));
2462   __ lea(rbcp, Address(rbcp, rbx, Address::times_1,
2463                       ConstMethod::codes_offset()));
2464   __ dispatch_next(vtos, 0, true);
2465 }
2466 




2425   __ jcc(j_not(cc), not_taken);
2426   branch(false, false);
2427   __ bind(not_taken);
2428   __ profile_not_taken_branch(rax);
2429 }
2430 
2431 void TemplateTable::if_nullcmp(Condition cc) {
2432   transition(atos, vtos);
2433   // assume branch is more often taken than not (loops use backward branches)
2434   Label not_taken;
2435   __ testptr(rax, rax);
2436   __ jcc(j_not(cc), not_taken);
2437   branch(false, false);
2438   __ bind(not_taken);
2439   __ profile_not_taken_branch(rax);
2440 }
2441 
2442 void TemplateTable::if_acmp(Condition cc) {
2443   transition(atos, vtos);
2444   // assume branch is more often taken than not (loops use backward branches)
2445   Label not_taken, is_null;
2446   __ pop_ptr(rdx);
2447 
2448   if (UseNewAcmp) {
2449     // TODO what about interpreter buffered values?
2450     const int mask = Universe::oop_metadata_odd_mask();
2451     __ testptr(rdx, rdx);
2452     __ jcc(Assembler::zero, is_null);
2453     __ movl(rbx, Address(rdx, oopDesc::klass_offset_in_bytes()));
2454     __ andptr(rbx, mask);
2455     // Check if a shift is required for perturbation to affect aligned bits
2456     if (mask == KlassPtrEvenOddMask && ObjectAlignmentInBytes <= KlassAlignmentInBytes) {
2457       assert((mask >> LogKlassAlignmentInBytes) == 1, "invalid shift");
2458       __ shrptr(rbx, LogKlassAlignmentInBytes);
2459     } else {
2460       assert(mask < ObjectAlignmentInBytes, "invalid mask");
2461     }
2462     __ orptr(rdx, rbx);
2463     __ bind(is_null);
2464   }
2465 
2466   __ cmpoop(rdx, rax);
2467   __ jcc(j_not(cc), not_taken);
2468   branch(false, false);
2469   __ bind(not_taken);
2470   __ profile_not_taken_branch(rax);
2471 }
2472 
2473 void TemplateTable::ret() {
2474   transition(vtos, vtos);
2475   locals_index(rbx);
2476   LP64_ONLY(__ movslq(rbx, iaddress(rbx))); // get return bci, compute return bcp
2477   NOT_LP64(__ movptr(rbx, iaddress(rbx)));
2478   __ profile_ret(rbx, rcx);
2479   __ get_method(rax);
2480   __ movptr(rbcp, Address(rax, Method::const_offset()));
2481   __ lea(rbcp, Address(rbcp, rbx, Address::times_1,
2482                       ConstMethod::codes_offset()));
2483   __ dispatch_next(vtos, 0, true);
2484 }
2485 


< prev index next >