< prev index next >

src/hotspot/cpu/aarch64/templateTable_aarch64.cpp

Print this page
rev 50099 : 8203157: Object equals abstraction for BarrierSetAssembler


2019 void TemplateTable::if_nullcmp(Condition cc)
2020 {
2021   transition(atos, vtos);
2022   // assume branch is more often taken than not (loops use backward branches)
2023   Label not_taken;
2024   if (cc == equal)
2025     __ cbnz(r0, not_taken);
2026   else
2027     __ cbz(r0, not_taken);
2028   branch(false, false);
2029   __ bind(not_taken);
2030   __ profile_not_taken_branch(r0);
2031 }
2032 
2033 void TemplateTable::if_acmp(Condition cc)
2034 {
2035   transition(atos, vtos);
2036   // assume branch is more often taken than not (loops use backward branches)
2037   Label not_taken;
2038   __ pop_ptr(r1);
2039   __ cmp(r1, r0);
2040   __ br(j_not(cc), not_taken);
2041   branch(false, false);
2042   __ bind(not_taken);
2043   __ profile_not_taken_branch(r0);
2044 }
2045 
2046 void TemplateTable::ret() {
2047   transition(vtos, vtos);
2048   // We might be moving to a safepoint.  The thread which calls
2049   // Interpreter::notice_safepoints() will effectively flush its cache
2050   // when it makes a system call, but we need to do something to
2051   // ensure that we see the changed dispatch table.
2052   __ membar(MacroAssembler::LoadLoad);
2053 
2054   locals_index(r1);
2055   __ ldr(r1, aaddress(r1)); // get return bci, compute return bcp
2056   __ profile_ret(r1, r2);
2057   __ ldr(rbcp, Address(rmethod, Method::const_offset()));
2058   __ lea(rbcp, Address(rbcp, r1));
2059   __ add(rbcp, rbcp, in_bytes(ConstMethod::codes_offset()));




2019 void TemplateTable::if_nullcmp(Condition cc)
2020 {
2021   transition(atos, vtos);
2022   // assume branch is more often taken than not (loops use backward branches)
2023   Label not_taken;
2024   if (cc == equal)
2025     __ cbnz(r0, not_taken);
2026   else
2027     __ cbz(r0, not_taken);
2028   branch(false, false);
2029   __ bind(not_taken);
2030   __ profile_not_taken_branch(r0);
2031 }
2032 
2033 void TemplateTable::if_acmp(Condition cc)
2034 {
2035   transition(atos, vtos);
2036   // assume branch is more often taken than not (loops use backward branches)
2037   Label not_taken;
2038   __ pop_ptr(r1);
2039   __ cmpoop(r1, r0);
2040   __ br(j_not(cc), not_taken);
2041   branch(false, false);
2042   __ bind(not_taken);
2043   __ profile_not_taken_branch(r0);
2044 }
2045 
2046 void TemplateTable::ret() {
2047   transition(vtos, vtos);
2048   // We might be moving to a safepoint.  The thread which calls
2049   // Interpreter::notice_safepoints() will effectively flush its cache
2050   // when it makes a system call, but we need to do something to
2051   // ensure that we see the changed dispatch table.
2052   __ membar(MacroAssembler::LoadLoad);
2053 
2054   locals_index(r1);
2055   __ ldr(r1, aaddress(r1)); // get return bci, compute return bcp
2056   __ profile_ret(r1, r2);
2057   __ ldr(rbcp, Address(rmethod, Method::const_offset()));
2058   __ lea(rbcp, Address(rbcp, r1));
2059   __ add(rbcp, rbcp, in_bytes(ConstMethod::codes_offset()));


< prev index next >