1 /* 2 * Copyright (c) 2019, 2021, Oracle and/or its affiliates. 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 it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 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 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_ASM_MACROASSEMBLER_COMMON_HPP 26 #define SHARE_ASM_MACROASSEMBLER_COMMON_HPP 27 28 // These are part of the MacroAssembler class that are common for all CPUs 29 30 // class MacroAssembler ... { 31 32 enum RegState { 33 reg_readonly, 34 reg_writable, 35 reg_written 36 }; 37 38 void skip_unpacked_fields(const GrowableArray<SigEntry>* sig, int& sig_index, VMRegPair* regs_from, 39 int regs_from_count, int& from_index); 40 bool is_reg_in_unpacked_fields(const GrowableArray<SigEntry>* sig, int sig_index, VMReg to, VMRegPair* regs_from, 41 int regs_from_count, int from_index); 42 void mark_reg_writable(const VMRegPair* regs, int num_regs, int reg_index, RegState* reg_state); 43 RegState* init_reg_state(VMRegPair* regs, int num_regs, int sp_inc, int max_stack); 44 int unpack_inline_args(Compile* C, bool receiver_only); 45 void shuffle_inline_args(bool is_packing, bool receiver_only, 46 const GrowableArray<SigEntry>* sig, 47 int args_passed, int args_on_stack, VMRegPair* regs, 48 int args_passed_to, int args_on_stack_to, VMRegPair* regs_to, 49 int sp_inc, Register val_array); 50 bool shuffle_inline_args_spill(bool is_packing, const GrowableArray<SigEntry>* sig, int sig_index, 51 VMRegPair* regs_from, int from_index, int regs_from_count, RegState* reg_state); 52 // }; 53 54 #endif // SHARE_ASM_MACROASSEMBLER_COMMON_HPP