Path: blob/master/src/hotspot/cpu/arm/c1_FrameMap_arm.hpp
40930 views
/*1* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef CPU_ARM_C1_FRAMEMAP_ARM_HPP25#define CPU_ARM_C1_FRAMEMAP_ARM_HPP2627public:2829enum {30first_available_sp_in_frame = 0,31frame_pad_in_bytes = 2*wordSize // Account for FP/LR saved at build_frame().32};3334static LIR_Opr R0_opr;35static LIR_Opr R1_opr;36static LIR_Opr R2_opr;37static LIR_Opr R3_opr;38static LIR_Opr R4_opr;39static LIR_Opr R5_opr;40// add more predefined register oprs as needed4142static LIR_Opr R0_oop_opr;43static LIR_Opr R1_oop_opr;44static LIR_Opr R2_oop_opr;45static LIR_Opr R3_oop_opr;46static LIR_Opr R4_oop_opr;47static LIR_Opr R5_oop_opr;4849static LIR_Opr R0_metadata_opr;50static LIR_Opr R1_metadata_opr;51static LIR_Opr R2_metadata_opr;52static LIR_Opr R3_metadata_opr;53static LIR_Opr R4_metadata_opr;54static LIR_Opr R5_metadata_opr;555657static LIR_Opr LR_opr;58static LIR_Opr LR_oop_opr;59static LIR_Opr LR_ptr_opr;6061static LIR_Opr FP_opr;62static LIR_Opr SP_opr;63static LIR_Opr Rthread_opr;6465static LIR_Opr Int_result_opr;66static LIR_Opr Long_result_opr;67static LIR_Opr Object_result_opr;68static LIR_Opr Float_result_opr;69static LIR_Opr Double_result_opr;7071static LIR_Opr Exception_oop_opr;72static LIR_Opr Exception_pc_opr;7374static LIR_Opr as_long_opr(Register r, Register r2) {75return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r2));76}7778static LIR_Opr as_pointer_opr(Register r) {79return LIR_OprFact::single_cpu(cpu_reg2rnr(r));80}8182static LIR_Opr as_double_opr(FloatRegister r) {83return LIR_OprFact::double_fpu(r->encoding(), r->successor()->encoding());84}8586static LIR_Opr as_float_opr(FloatRegister r) {87return LIR_OprFact::single_fpu(r->encoding());88}8990static VMReg fpu_regname(int n);9192static bool is_caller_save_register(LIR_Opr opr) {93return true;94}9596static int adjust_reg_range(int range) {97// Reduce the number of available regs (to free Rheap_base) in case of compressed oops98if (UseCompressedOops || UseCompressedClassPointers) return range - 1;99return range;100}101102static int nof_caller_save_cpu_regs() {103return adjust_reg_range(pd_nof_caller_save_cpu_regs_frame_map);104}105106static int last_cpu_reg() {107return pd_last_cpu_reg;108}109110#endif // CPU_ARM_C1_FRAMEMAP_ARM_HPP111112113