0N/A/*
1988N/A * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#ifndef CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP
1879N/A#define CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP
1879N/A
0N/A void pd_init() { /* nothing to do */ }
0N/A
0N/A public:
0N/A void try_allocate(
0N/A Register obj, // result: pointer to object after successful allocation
0N/A Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise
0N/A int con_size_in_bytes, // object size in bytes if known at compile time
0N/A Register t1, // temp register
0N/A Register t2, // temp register
0N/A Label& slow_case // continuation point if fast allocation fails
0N/A );
0N/A
0N/A void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);
0N/A void initialize_body(Register base, Register index);
0N/A
0N/A // locking/unlocking
0N/A void lock_object (Register Rmark, Register Roop, Register Rbox, Register Rscratch, Label& slow_case);
0N/A void unlock_object(Register Rmark, Register Roop, Register Rbox, Label& slow_case);
0N/A
0N/A void initialize_object(
0N/A Register obj, // result: pointer to object after successful allocation
0N/A Register klass, // object klass
0N/A Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise
0N/A int con_size_in_bytes, // object size in bytes if known at compile time
0N/A Register t1, // temp register
0N/A Register t2 // temp register
0N/A );
0N/A
0N/A // allocation of fixed-size objects
0N/A // (can also be used to allocate fixed-size arrays, by setting
0N/A // hdr_size correctly and storing the array length afterwards)
0N/A void allocate_object(
0N/A Register obj, // result: pointer to object after successful allocation
0N/A Register t1, // temp register
0N/A Register t2, // temp register
0N/A Register t3, // temp register
0N/A int hdr_size, // object header size in words
0N/A int obj_size, // object size in words
0N/A Register klass, // object klass
0N/A Label& slow_case // continuation point if fast allocation fails
0N/A );
0N/A
0N/A enum {
0N/A max_array_allocation_length = 0x01000000 // sparc friendly value, requires sethi only
0N/A };
0N/A
0N/A // allocation of arrays
0N/A void allocate_array(
0N/A Register obj, // result: pointer to array after successful allocation
0N/A Register len, // array length
0N/A Register t1, // temp register
0N/A Register t2, // temp register
0N/A Register t3, // temp register
0N/A int hdr_size, // object header size in words
0N/A int elt_size, // element size in bytes
0N/A Register klass, // object klass
0N/A Label& slow_case // continuation point if fast allocation fails
0N/A );
0N/A
0N/A // invalidates registers in this window
0N/A void invalidate_registers(bool iregisters, bool lregisters, bool oregisters,
0N/A Register preserve1 = noreg, Register preserve2 = noreg);
1879N/A
1879N/A#endif // CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP