Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/cpu/aarch32/vm/c1_MacroAssembler_aarch32.hpp
32285 views
/*1* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2014, Red Hat Inc. 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*/24// This file is a derivative work resulting from (and including) modifications25// made by Azul Systems, Inc. The dates of such changes are 2013-2016.26// Copyright 2013-2016 Azul Systems, Inc. All Rights Reserved.27//28// Please contact Azul Systems, 385 Moffett Park Drive, Suite 115, Sunnyvale,29// CA 94089 USA or visit www.azul.com if you need additional information or30// have any questions.3132#ifndef CPU_AARCH32_VM_C1_MACROASSEMBLER_AARCH32_HPP33#define CPU_AARCH32_VM_C1_MACROASSEMBLER_AARCH32_HPP3435// C1_MacroAssembler contains high-level macros for C13637private:38int _rsp_offset; // track rsp changes39// initialization40void pd_init() { _rsp_offset = 0; }4142void zero_memory(Register addr, Register len, Register t1);4344public:45void try_allocate(46Register obj, // result: pointer to object after successful allocation47Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise48int con_size_in_bytes, // object size in bytes if known at compile time49Register t1, // temp register50Register t2, // temp register51Label& slow_case // continuation point if fast allocation fails52);5354void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);55void initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1);5657void float_cmp(bool is_float, int unordered_result,58FloatRegister f0, FloatRegister f1,59Register result);6061// locking62// hdr : must be r0, contents destroyed63// obj : must point to the object to lock, contents preserved64// disp_hdr: must point to the displaced header location, contents preserved65// scratch : scratch register, contents destroyed66// returns code offset at which to add null check debug information67int lock_object (Register swap, Register obj, Register disp_hdr, Register scratch, Label& slow_case);6869// unlocking70// hdr : contents destroyed71// obj : must point to the object to lock, contents preserved72// disp_hdr: must be r0 & must point to the displaced header location, contents destroyed73void unlock_object(Register swap, Register obj, Register lock, Label& slow_case);7475void initialize_object(76Register obj, // result: pointer to object after successful allocation77Register klass, // object klass78Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise79int con_size_in_bytes, // object size in bytes if known at compile time80Register t1, // temp register81Register t2 // temp register82);8384// allocation of fixed-size objects85// (can also be used to allocate fixed-size arrays, by setting86// hdr_size correctly and storing the array length afterwards)87// obj : will contain pointer to allocated object88// t1, t2 : scratch registers - contents destroyed89// header_size: size of object header in words90// object_size: total size of object in words91// slow_case : exit to slow case implementation if fast allocation fails92void allocate_object(Register obj, Register t1, Register t2, int header_size, int object_size, Register klass, Label& slow_case);9394enum {95max_array_allocation_length = 0x00FFFFFF96};9798// allocation of arrays99// obj : will contain pointer to allocated object100// len : array length in number of elements101// t : scratch register - contents destroyed102// header_size: size of object header in words103// f : element scale factor104// slow_case : exit to slow case implementation if fast allocation fails105void allocate_array(Register obj, Register len, Register t, Register t2, int header_size, int f, Register klass, Label& slow_case);106107int rsp_offset() const { return _rsp_offset; }108void set_rsp_offset(int n) { _rsp_offset = n; }109110void invalidate_registers(bool inv_r0, bool inv_r2, bool inv_r3) PRODUCT_RETURN;111112void patchable_load(Register reg, address addr);113114#endif // CPU_AARCH32_VM_C1_MACROASSEMBLER_AARCH32_HPP115116117