Path: blob/master/src/hotspot/cpu/aarch64/c1_LIR_aarch64.cpp
40930 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_LIR.hpp"2728FloatRegister LIR_OprDesc::as_float_reg() const {29return as_FloatRegister(fpu_regnr());30}3132FloatRegister LIR_OprDesc::as_double_reg() const {33return as_FloatRegister(fpu_regnrLo());34}3536// Reg2 unused.37LIR_Opr LIR_OprFact::double_fpu(int reg1, int reg2) {38assert(as_FloatRegister(reg2) == fnoreg, "Not used on this platform");39return (LIR_Opr)(intptr_t)((reg1 << LIR_OprDesc::reg1_shift) |40(reg1 << LIR_OprDesc::reg2_shift) |41LIR_OprDesc::double_type |42LIR_OprDesc::fpu_register |43LIR_OprDesc::double_size);44}4546#ifndef PRODUCT47void LIR_Address::verify() const {48assert(base()->is_cpu_register(), "wrong base operand");49assert(index()->is_illegal() || index()->is_double_cpu() || index()->is_single_cpu(), "wrong index operand");50assert(base()->type() == T_ADDRESS || base()->type() == T_OBJECT || base()->type() == T_LONG || base()->type() == T_METADATA,51"wrong type for addresses");52}53#endif // PRODUCT545556