Path: blob/master/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.hpp
40930 views
/*1* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2012, 2015 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_PPC_C1_MACROASSEMBLER_PPC_HPP26#define CPU_PPC_C1_MACROASSEMBLER_PPC_HPP2728void pd_init() { /* nothing to do */ }2930public:31void try_allocate(32Register obj, // result: pointer to object after successful allocation33Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise34int con_size_in_bytes, // object size in bytes if known at compile time35Register t1, // temp register36Register t2, // temp register37Label& slow_case // continuation point if fast allocation fails38);3940void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);41void initialize_body(Register base, Register index);42void initialize_body(Register obj, Register tmp1, Register tmp2, int obj_size_in_bytes, int hdr_size_in_bytes);4344// locking/unlocking45void lock_object (Register Rmark, Register Roop, Register Rbox, Register Rscratch, Label& slow_case);46void unlock_object(Register Rmark, Register Roop, Register Rbox, Label& slow_case);4748void initialize_object(49Register obj, // result: pointer to object after successful allocation50Register klass, // object klass51Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise52int con_size_in_bytes, // object size in bytes if known at compile time53Register t1, // temp register54Register t2 // temp register55);5657// Allocation of fixed-size objects58// (Can also be used to allocate fixed-size arrays, by setting59// hdr_size correctly and storing the array length afterwards.)60void allocate_object(61Register obj, // result: pointer to object after successful allocation62Register t1, // temp register63Register t2, // temp register64Register t3, // temp register65int hdr_size, // object header size in words66int obj_size, // object size in words67Register klass, // object klass68Label& slow_case // continuation point if fast allocation fails69);7071enum {72max_array_allocation_length = 0x40000000 // ppc friendly value, requires lis only73};7475// Allocation of arrays76void allocate_array(77Register obj, // result: pointer to array after successful allocation78Register len, // array length79Register t1, // temp register80Register t2, // temp register81Register t3, // temp register82int hdr_size, // object header size in words83int elt_size, // element size in bytes84Register klass, // object klass85Label& slow_case // continuation point if fast allocation fails86);8788void null_check(Register r, Label *Lnull = NULL);8990address call_c_with_frame_resize(address dest, int frame_resize);9192#endif // CPU_PPC_C1_MACROASSEMBLER_PPC_HPP939495