Path: blob/master/src/hotspot/cpu/x86/c1_LIR_x86.cpp
41144 views
/*1* Copyright (c) 2016, 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 "asm/register.hpp"26#include "c1/c1_FrameMap.hpp"27#include "c1/c1_LIR.hpp"282930FloatRegister LIR_OprDesc::as_float_reg() const {31ShouldNotReachHere();32return fnoreg;33}3435FloatRegister LIR_OprDesc::as_double_reg() const {36ShouldNotReachHere();37return fnoreg;38}3940XMMRegister LIR_OprDesc::as_xmm_float_reg() const {41return FrameMap::nr2xmmreg(xmm_regnr());42}4344XMMRegister LIR_OprDesc::as_xmm_double_reg() const {45assert(xmm_regnrLo() == xmm_regnrHi(), "assumed in calculation");46return FrameMap::nr2xmmreg(xmm_regnrLo());47}4849// Reg2 unused.50LIR_Opr LIR_OprFact::double_fpu(int reg1, int reg2) {51assert(as_FloatRegister(reg2) == fnoreg, "Not used on this platform");52return (LIR_Opr)(intptr_t)((reg1 << LIR_OprDesc::reg1_shift) |53(reg1 << LIR_OprDesc::reg2_shift) |54LIR_OprDesc::double_type |55LIR_OprDesc::fpu_register |56LIR_OprDesc::double_size);57}5859#ifndef PRODUCT60void LIR_Address::verify() const {61#ifdef _LP6462assert(base()->is_cpu_register(), "wrong base operand");63assert(index()->is_illegal() || index()->is_double_cpu(), "wrong index operand");64assert(base()->type() == T_ADDRESS || base()->type() == T_OBJECT || base()->type() == T_LONG || base()->type() == T_METADATA,65"wrong type for addresses");66#else67assert(base()->is_single_cpu(), "wrong base operand");68assert(index()->is_illegal() || index()->is_single_cpu(), "wrong index operand");69assert(base()->type() == T_ADDRESS || base()->type() == T_OBJECT || base()->type() == T_INT || base()->type() == T_METADATA,70"wrong type for addresses");71#endif72}73#endif // PRODUCT747576