3866 __ z_brne(slow_case);
3867
3868 // Get instance_size in InstanceKlass (scaled to a count of bytes).
3869 Register Rsize = offset;
3870 const int mask = 1 << Klass::_lh_instance_slow_path_bit;
3871 __ z_llgf(Rsize, Address(iklass, Klass::layout_helper_offset()));
3872 __ z_tmll(Rsize, mask);
3873 __ z_btrue(slow_case);
3874
3875 // Allocate the instance
3876 // 1) Try to allocate in the TLAB.
3877 // 2) If the above fails (or is not applicable), go to a slow case
3878 // (creates a new TLAB, etc.).
3879 // Note: compared to other architectures, s390's implementation always goes
3880 // to the slow path if TLAB is used and fails.
3881 if (UseTLAB) {
3882 Register RoldTopValue = RallocatedObject;
3883 Register RnewTopValue = tmp;
3884 __ z_lg(RoldTopValue, Address(Z_thread, JavaThread::tlab_top_offset()));
3885 __ load_address(RnewTopValue, Address(RoldTopValue, Rsize));
3886 __ z_cg(RnewTopValue, Address(Z_thread, JavaThread::tlab_end_offset()));
3887 __ z_brh(slow_case);
3888 __ z_stg(RnewTopValue, Address(Z_thread, JavaThread::tlab_top_offset()));
3889
3890 Register RobjectFields = tmp;
3891 Register Rzero = Z_R1_scratch;
3892 __ clear_reg(Rzero, true /*whole reg*/, false); // Load 0L into Rzero. Don't set CC.
3893
3894 if (!ZeroTLAB) {
3895 // The object is initialized before the header. If the object size is
3896 // zero, go directly to the header initialization.
3897 __ z_aghi(Rsize, (int)-sizeof(oopDesc)); // Subtract header size, set CC.
3898 __ z_bre(initialize_header); // Jump if size of fields is zero.
3899
3900 // Initialize object fields.
3901 // See documentation for MVCLE instruction!!!
3902 assert(RobjectFields->encoding() % 2 == 0, "RobjectFields must be an even register");
3903 assert(Rsize->encoding() == (RobjectFields->encoding()+1),
3904 "RobjectFields and Rsize must be a register pair");
3905 assert(Rzero->encoding() % 2 == 1, "Rzero must be an odd register");
3906
|
3866 __ z_brne(slow_case);
3867
3868 // Get instance_size in InstanceKlass (scaled to a count of bytes).
3869 Register Rsize = offset;
3870 const int mask = 1 << Klass::_lh_instance_slow_path_bit;
3871 __ z_llgf(Rsize, Address(iklass, Klass::layout_helper_offset()));
3872 __ z_tmll(Rsize, mask);
3873 __ z_btrue(slow_case);
3874
3875 // Allocate the instance
3876 // 1) Try to allocate in the TLAB.
3877 // 2) If the above fails (or is not applicable), go to a slow case
3878 // (creates a new TLAB, etc.).
3879 // Note: compared to other architectures, s390's implementation always goes
3880 // to the slow path if TLAB is used and fails.
3881 if (UseTLAB) {
3882 Register RoldTopValue = RallocatedObject;
3883 Register RnewTopValue = tmp;
3884 __ z_lg(RoldTopValue, Address(Z_thread, JavaThread::tlab_top_offset()));
3885 __ load_address(RnewTopValue, Address(RoldTopValue, Rsize));
3886 __ z_cg(RnewTopValue, Address(Z_thread, JavaThread::tlab_fast_path_end_offset()));
3887 __ z_brh(slow_case);
3888 __ z_stg(RnewTopValue, Address(Z_thread, JavaThread::tlab_top_offset()));
3889
3890 Register RobjectFields = tmp;
3891 Register Rzero = Z_R1_scratch;
3892 __ clear_reg(Rzero, true /*whole reg*/, false); // Load 0L into Rzero. Don't set CC.
3893
3894 if (!ZeroTLAB) {
3895 // The object is initialized before the header. If the object size is
3896 // zero, go directly to the header initialization.
3897 __ z_aghi(Rsize, (int)-sizeof(oopDesc)); // Subtract header size, set CC.
3898 __ z_bre(initialize_header); // Jump if size of fields is zero.
3899
3900 // Initialize object fields.
3901 // See documentation for MVCLE instruction!!!
3902 assert(RobjectFields->encoding() % 2 == 0, "RobjectFields must be an even register");
3903 assert(Rsize->encoding() == (RobjectFields->encoding()+1),
3904 "RobjectFields and Rsize must be a register pair");
3905 assert(Rzero->encoding() % 2 == 1, "Rzero must be an odd register");
3906
|