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