1 /* 2 * Copyright (c) 2020, 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 #ifndef CPU_X86_VM_FOREIGN_GLOBALS_X86_HPP 25 #define CPU_X86_VM_FOREIGN_GLOBALS_X86_HPP 26 27 #include "asm/macroAssembler.hpp" 28 #include "utilities/growableArray.hpp" 29 30 class outputStream; 31 32 constexpr size_t xmm_reg_size = 16; // size of XMM reg 33 34 struct ABIDescriptor { 35 GrowableArray<Register> _integer_argument_registers; 36 GrowableArray<Register> _integer_return_registers; 37 GrowableArray<XMMRegister> _vector_argument_registers; 38 GrowableArray<XMMRegister> _vector_return_registers; 39 size_t _X87_return_registers_noof; 40 41 GrowableArray<Register> _integer_additional_volatile_registers; 42 GrowableArray<XMMRegister> _vector_additional_volatile_registers; 43 44 int32_t _stack_alignment_bytes; 45 int32_t _shadow_space_bytes; 46 47 Register _target_addr_reg; 48 Register _ret_buf_addr_reg; 49 50 bool is_volatile_reg(Register reg) const; 51 bool is_volatile_reg(XMMRegister reg) const; 52 }; 53 54 #endif // CPU_X86_VM_FOREIGN_GLOBALS_X86_HPP