Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.hpp
32285 views
/*1* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP25#define CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP2627void pd_init() { /* nothing to do */ }2829public:30void try_allocate(31Register obj, // result: pointer to object after successful allocation32Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise33int con_size_in_bytes, // object size in bytes if known at compile time34Register t1, // temp register35Register t2, // temp register36Label& slow_case // continuation point if fast allocation fails37);3839void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);40void initialize_body(Register base, Register index);4142// locking/unlocking43void lock_object (Register Rmark, Register Roop, Register Rbox, Register Rscratch, Label& slow_case);44void unlock_object(Register Rmark, Register Roop, Register Rbox, Label& slow_case);4546void initialize_object(47Register obj, // result: pointer to object after successful allocation48Register klass, // object klass49Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise50int con_size_in_bytes, // object size in bytes if known at compile time51Register t1, // temp register52Register t2 // temp register53);5455// allocation of fixed-size objects56// (can also be used to allocate fixed-size arrays, by setting57// hdr_size correctly and storing the array length afterwards)58void allocate_object(59Register obj, // result: pointer to object after successful allocation60Register t1, // temp register61Register t2, // temp register62Register t3, // temp register63int hdr_size, // object header size in words64int obj_size, // object size in words65Register klass, // object klass66Label& slow_case // continuation point if fast allocation fails67);6869enum {70max_array_allocation_length = 0x01000000 // sparc friendly value, requires sethi only71};7273// allocation of arrays74void allocate_array(75Register obj, // result: pointer to array after successful allocation76Register len, // array length77Register t1, // temp register78Register t2, // temp register79Register t3, // temp register80int hdr_size, // object header size in words81int elt_size, // element size in bytes82Register klass, // object klass83Label& slow_case // continuation point if fast allocation fails84);8586// invalidates registers in this window87void invalidate_registers(bool iregisters, bool lregisters, bool oregisters,88Register preserve1 = noreg, Register preserve2 = noreg);8990#endif // CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP919293