Path: blob/master/src/hotspot/cpu/s390/c1_FrameMap_s390.hpp
40930 views
/*1* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2016 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_S390_C1_FRAMEMAP_S390_HPP26#define CPU_S390_C1_FRAMEMAP_S390_HPP2728public:2930enum {31nof_reg_args = 5, // Registers Z_ARG1 - Z_ARG5 are available for parameter passing.32first_available_sp_in_frame = frame::z_abi_16_size,33frame_pad_in_bytes = 034};3536static const int pd_c_runtime_reserved_arg_size;3738static LIR_Opr Z_R0_opr;39static LIR_Opr Z_R1_opr;40static LIR_Opr Z_R2_opr;41static LIR_Opr Z_R3_opr;42static LIR_Opr Z_R4_opr;43static LIR_Opr Z_R5_opr;44static LIR_Opr Z_R6_opr;45static LIR_Opr Z_R7_opr;46static LIR_Opr Z_R8_opr;47static LIR_Opr Z_R9_opr;48static LIR_Opr Z_R10_opr;49static LIR_Opr Z_R11_opr;50static LIR_Opr Z_R12_opr;51static LIR_Opr Z_R13_opr;52static LIR_Opr Z_R14_opr;53static LIR_Opr Z_R15_opr;5455static LIR_Opr Z_R0_oop_opr;56static LIR_Opr Z_R1_oop_opr;57static LIR_Opr Z_R2_oop_opr;58static LIR_Opr Z_R3_oop_opr;59static LIR_Opr Z_R4_oop_opr;60static LIR_Opr Z_R5_oop_opr;61static LIR_Opr Z_R6_oop_opr;62static LIR_Opr Z_R7_oop_opr;63static LIR_Opr Z_R8_oop_opr;64static LIR_Opr Z_R9_oop_opr;65static LIR_Opr Z_R10_oop_opr;66static LIR_Opr Z_R11_oop_opr;67static LIR_Opr Z_R12_oop_opr;68static LIR_Opr Z_R13_oop_opr;69static LIR_Opr Z_R14_oop_opr;70static LIR_Opr Z_R15_oop_opr;7172static LIR_Opr Z_R0_metadata_opr;73static LIR_Opr Z_R1_metadata_opr;74static LIR_Opr Z_R2_metadata_opr;75static LIR_Opr Z_R3_metadata_opr;76static LIR_Opr Z_R4_metadata_opr;77static LIR_Opr Z_R5_metadata_opr;78static LIR_Opr Z_R6_metadata_opr;79static LIR_Opr Z_R7_metadata_opr;80static LIR_Opr Z_R8_metadata_opr;81static LIR_Opr Z_R9_metadata_opr;82static LIR_Opr Z_R10_metadata_opr;83static LIR_Opr Z_R11_metadata_opr;84static LIR_Opr Z_R12_metadata_opr;85static LIR_Opr Z_R13_metadata_opr;86static LIR_Opr Z_R14_metadata_opr;87static LIR_Opr Z_R15_metadata_opr;8889static LIR_Opr Z_SP_opr;90static LIR_Opr Z_FP_opr;9192static LIR_Opr Z_R2_long_opr;93static LIR_Opr Z_R10_long_opr;94static LIR_Opr Z_R11_long_opr;9596static LIR_Opr Z_F0_opr;97static LIR_Opr Z_F0_double_opr;9899private:100static FloatRegister _fpu_rnr2reg [FrameMap::nof_fpu_regs]; // mapping c1 regnr. -> FloatRegister101static int _fpu_reg2rnr [FrameMap::nof_fpu_regs]; // mapping assembler encoding -> c1 regnr.102103static void map_float_register(int rnr, FloatRegister reg);104105// FloatRegister -> c1 rnr106static int fpu_reg2rnr (FloatRegister reg) {107assert(_init_done, "tables not initialized");108int c1rnr = _fpu_reg2rnr[reg->encoding()];109debug_only(fpu_range_check(c1rnr);)110return c1rnr;111}112113public:114115static LIR_Opr as_long_opr(Register r) {116return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));117}118static LIR_Opr as_pointer_opr(Register r) {119return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));120}121122static LIR_Opr as_float_opr(FloatRegister r) {123return LIR_OprFact::single_fpu(fpu_reg2rnr(r));124}125static LIR_Opr as_double_opr(FloatRegister r) {126return LIR_OprFact::double_fpu(fpu_reg2rnr(r));127}128129static FloatRegister nr2floatreg (int rnr);130131static VMReg fpu_regname (int n);132133// No callee saved registers (saved values are not accessible if callee is in runtime).134static bool is_caller_save_register (LIR_Opr opr) { return true; }135static bool is_caller_save_register (Register r) { return true; }136137static int nof_caller_save_cpu_regs() { return pd_nof_caller_save_cpu_regs_frame_map; }138static int last_cpu_reg() { return pd_last_cpu_reg; }139140#endif // CPU_S390_C1_FRAMEMAP_S390_HPP141142143