< prev index next >

src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp

Print this page

1785   __ z_mvi(do_not_unlock_if_synchronized, false);
1786 
1787   // Check for synchronized methods.
1788   // Must happen AFTER invocation_counter check and stack overflow check,
1789   // so method is not locked if overflows.
1790   if (synchronized) {
1791     // Allocate monitor and lock method.
1792     lock_method();
1793   } else {
1794 #ifdef ASSERT
1795     { Label L;
1796       __ get_method(Z_R1_scratch);
1797       __ testbit_ushort(method2_(Z_R1_scratch, access_flags), JVM_ACC_SYNCHRONIZED_BIT);
1798       __ z_bfalse(L);
1799       reentry = __ stop_chain_static(reentry, "method needs synchronization");
1800       __ bind(L);
1801     }
1802 #endif // ASSERT
1803   }
1804 






1805   // start execution
1806 
1807 #ifdef ASSERT
1808   __ verify_esp(Z_esp, Z_R1_scratch);
1809 #endif
1810 
1811   // jvmti support
1812   __ notify_method_entry();
1813 
1814   // Start executing instructions.
1815   __ dispatch_next(vtos);
1816   // Dispatch_next does not return.
1817   DEBUG_ONLY(__ should_not_reach_here());
1818 
1819   // Invocation counter overflow.
1820   if (inc_counter) {
1821     // Handle invocation counter overflow.
1822     __ bind(invocation_counter_overflow);
1823     generate_counter_overflow(Lcontinue);
1824   }

1785   __ z_mvi(do_not_unlock_if_synchronized, false);
1786 
1787   // Check for synchronized methods.
1788   // Must happen AFTER invocation_counter check and stack overflow check,
1789   // so method is not locked if overflows.
1790   if (synchronized) {
1791     // Allocate monitor and lock method.
1792     lock_method();
1793   } else {
1794 #ifdef ASSERT
1795     { Label L;
1796       __ get_method(Z_R1_scratch);
1797       __ testbit_ushort(method2_(Z_R1_scratch, access_flags), JVM_ACC_SYNCHRONIZED_BIT);
1798       __ z_bfalse(L);
1799       reentry = __ stop_chain_static(reentry, "method needs synchronization");
1800       __ bind(L);
1801     }
1802 #endif // ASSERT
1803   }
1804 
1805   // If object_init == true, we should insert a StoreStore barrier here to
1806   // prevent strict fields initial default values from being observable.
1807   // However, s390 is a TSO platform, so if `this` escapes, strict fields
1808   // initialized values are guaranteed to be the ones observed, so the
1809   // barrier can be elided.
1810 
1811   // start execution
1812 
1813 #ifdef ASSERT
1814   __ verify_esp(Z_esp, Z_R1_scratch);
1815 #endif
1816 
1817   // jvmti support
1818   __ notify_method_entry();
1819 
1820   // Start executing instructions.
1821   __ dispatch_next(vtos);
1822   // Dispatch_next does not return.
1823   DEBUG_ONLY(__ should_not_reach_here());
1824 
1825   // Invocation counter overflow.
1826   if (inc_counter) {
1827     // Handle invocation counter overflow.
1828     __ bind(invocation_counter_overflow);
1829     generate_counter_overflow(Lcontinue);
1830   }
< prev index next >