Path: blob/master/src/hotspot/cpu/arm/c1_LIR_arm.cpp
40930 views
/*1* Copyright (c) 2010, 2020, 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#include "precompiled.hpp"25#include "c1/c1_LIR.hpp"2627FloatRegister LIR_OprDesc::as_float_reg() const {28return as_FloatRegister(fpu_regnr());29}3031FloatRegister LIR_OprDesc::as_double_reg() const {32return as_FloatRegister(fpu_regnrLo());33}3435LIR_Opr LIR_OprFact::double_fpu(int reg1, int reg2) {36assert(as_FloatRegister(reg2) != fnoreg, "Arm32 holds double in two regs.");37return (LIR_Opr)(intptr_t)((reg1 << LIR_OprDesc::reg1_shift) |38(reg2 << LIR_OprDesc::reg2_shift) |39LIR_OprDesc::double_type |40LIR_OprDesc::fpu_register |41LIR_OprDesc::double_size);42}4344#ifndef PRODUCT45void LIR_Address::verify() const {46#ifdef _LP6447assert(base()->is_cpu_register(), "wrong base operand");48#endif49assert(disp() == 0 || index()->is_illegal(), "can't have both");50// Note: offsets higher than 4096 must not be rejected here. They can51// be handled by the back-end or will be rejected if not.52#ifdef _LP6453assert(index()->is_illegal() || index()->is_double_cpu(), "wrong index operand");54assert(base()->type() == T_ADDRESS || base()->type() == T_OBJECT || base()->type() == T_LONG || base()->type() == T_METADATA,55"wrong type for addresses");56#else57assert(base()->is_single_cpu(), "wrong base operand");58assert(index()->is_illegal() || index()->is_single_cpu(), "wrong index operand");59assert(base()->type() == T_ADDRESS || base()->type() == T_OBJECT || base()->type() == T_INT || base()->type() == T_METADATA,60"wrong type for addresses");61#endif62}63#endif // PRODUCT646566