Path: blob/master/runtime/compiler/z/codegen/J9SystemLinkageLinux.hpp
6004 views
/*******************************************************************************1* Copyright (c) 2000, 2020 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#ifndef J9_Z_SYSTEMLINKAGELINUX_INCL23#define J9_Z_SYSTEMLINKAGELINUX_INCL2425#include "z/codegen/SystemLinkage.hpp"26#include "z/codegen/SystemLinkageLinux.hpp"2728#include <stdint.h>29#include "env/jittypes.h"3031namespace TR { class CodeGenerator; }32namespace TR { class Linkage; }33namespace TR { class Register; }34namespace TR { class RegisterDependencyConditions; }35namespace TR { class SystemLinkage; }3637namespace J938{3940namespace Z41{4243class zLinuxSystemLinkage : public TR::S390zLinuxSystemLinkage44{45public:46zLinuxSystemLinkage(TR::CodeGenerator * codeGen);4748virtual void generateInstructionsForCall(TR::Node * callNode, TR::RegisterDependencyConditions * deps, intptr_t targetAddress,49TR::Register * methodAddressReg, TR::Register * javaLitOffsetReg, TR::LabelSymbol * returnFromJNICallLabel,50TR::Snippet* callDataSnippet, bool isJNIGCPoint);5152virtual void setupRegisterDepForLinkage(TR::Node *, TR_DispatchType, TR::RegisterDependencyConditions * &,53int64_t &, TR::SystemLinkage *, TR::Node * &, bool &, TR::Register **, TR::Register *&);5455virtual void setupBuildArgForLinkage(TR::Node *, TR_DispatchType, TR::RegisterDependencyConditions *, bool, bool,56int64_t &, TR::Node *, bool, TR::SystemLinkage *);5758virtual void performCallNativeFunctionForLinkage(TR::Node *, TR_DispatchType, TR::Register *&, TR::SystemLinkage *,59TR::RegisterDependencyConditions *&, TR::Register *, TR::Register *, bool);6061virtual void doNotKillSpecialRegsForBuildArgs (TR::Linkage *linkage, bool isFastJNI, int64_t &killMask);62virtual void addSpecialRegDepsForBuildArgs(TR::Node * callNode, TR::RegisterDependencyConditions * dependencies, int32_t& from, int32_t step);63virtual int64_t addFECustomizedReturnRegDependency(int64_t killMask, TR::Linkage* linkage, TR::DataType resType, TR::RegisterDependencyConditions * dependencies);64virtual int32_t storeExtraEnvRegForBuildArgs(TR::Node * callNode, TR::Linkage* linkage, TR::RegisterDependencyConditions * dependencies,65bool isFastJNI, int32_t stackOffset, int8_t gprSize, uint32_t &numIntegerArgs);6667};6869}7071}7273#endif747576