Path: blob/master/src/hotspot/cpu/s390/c1_MacroAssembler_s390.hpp
40930 views
/*1* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2016 SAP SE. All rights reserved.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425#ifndef CPU_S390_C1_MACROASSEMBLER_S390_HPP26#define CPU_S390_C1_MACROASSEMBLER_S390_HPP2728void pd_init() { /* nothing to do */ }2930public:31void try_allocate(32Register obj, // result: Pointer to object after successful allocation.33Register var_size_in_bytes, // Object size in bytes if unknown at compile time; invalid otherwise.34int con_size_in_bytes, // Object size in bytes if known at compile time.35Register t1, // temp register36Label& slow_case // Continuation point if fast allocation fails.37);3839void initialize_header(Register obj, Register klass, Register len, Register Rzero, Register t1);40void initialize_body(Register objectFields, Register len_in_bytes, Register Rzero);4142// locking43// hdr : Used to hold locked markWord to be CASed into obj, contents destroyed.44// obj : Must point to the object to lock, contents preserved.45// disp_hdr: Must point to the displaced header location, contents preserved.46// Returns code offset at which to add null check debug information.47void lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case);4849// unlocking50// hdr : Used to hold original markWord to be CASed back into obj, contents destroyed.51// obj : Must point to the object to lock, contents preserved.52// disp_hdr: Must point to the displaced header location, contents destroyed.53void unlock_object(Register hdr, Register obj, Register lock, Label& slow_case);5455void initialize_object(56Register obj, // result: Pointer to object after successful allocation.57Register klass, // object klass58Register var_size_in_bytes, // Object size in bytes if unknown at compile time; invalid otherwise.59int con_size_in_bytes, // Object size in bytes if known at compile time.60Register t1, // temp register61Register t2 // temp register62);6364// Allocation of fixed-size objects.65// This can also be used to allocate fixed-size arrays, by setting66// hdr_size correctly and storing the array length afterwards.67void allocate_object(68Register obj, // result: Pointer to object after successful allocation.69Register t1, // temp register70Register t2, // temp register71int hdr_size, // object header size in words72int obj_size, // object size in words73Register klass, // object klass74Label& slow_case // Continuation point if fast allocation fails.75);7677enum {78max_array_allocation_length = 0x0100000079};8081// Allocation of arrays.82void allocate_array(83Register obj, // result: Pointer to array after successful allocation.84Register len, // array length85Register t1, // temp register86Register t2, // temp register87int hdr_size, // object header size in words88int elt_size, // element size in bytes89Register klass, // object klass90Label& slow_case // Continuation point if fast allocation fails.91);9293// Invalidates registers in this window.94void invalidate_registers(Register preserve1 = noreg, Register preserve2 = noreg,95Register preserve3 = noreg) PRODUCT_RETURN;9697// This platform only uses signal-based null checks. The Label is not needed.98void null_check(Register r, Label *Lnull = NULL) { MacroAssembler::null_check(r); }99100#endif // CPU_S390_C1_MACROASSEMBLER_S390_HPP101102103