Path: blob/master/runtime/compiler/z/codegen/J9SystemLinkagezOS.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_SYSTEMLINKAGEZOS_INCL23#define J9_Z_SYSTEMLINKAGEZOS_INCL2425#include "z/codegen/SystemLinkage.hpp"26#include "z/codegen/SystemLinkagezOS.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 zOSSystemLinkage : public TR::S390zOSSystemLinkage44{45public:46zOSSystemLinkage(TR::CodeGenerator * cg);4748virtual void generateInstructionsForCall(TR::Node * callNode, TR::RegisterDependencyConditions * dependencies,49intptr_t targetAddress, TR::Register * methodAddressReg, TR::Register * javaLitOffsetReg, TR::LabelSymbol * returnFromJNICallLabel,50TR::Snippet * callDataSnippet, bool isJNIGCPoint = true);51525354// this set of 3 method called by buildNative Dispatch is the same as the J9S390zLinux methods above55// omr todo: need to find a better way instead of duplicating them56virtual void setupRegisterDepForLinkage(TR::Node *, TR_DispatchType, TR::RegisterDependencyConditions * &,57int64_t &, TR::SystemLinkage *, TR::Node * &, bool &, TR::Register **, TR::Register *&);5859virtual void setupBuildArgForLinkage(TR::Node *, TR_DispatchType, TR::RegisterDependencyConditions *, bool, bool,60int64_t &, TR::Node *, bool, TR::SystemLinkage *);6162virtual void performCallNativeFunctionForLinkage(TR::Node *, TR_DispatchType, TR::Register *&, TR::SystemLinkage *,63TR::RegisterDependencyConditions *&, TR::Register *, TR::Register *, bool);6465//called by buildArgs, same as J9S390zLinux methods above66// omr todo: need to find a better way instead of duplicating them67virtual void doNotKillSpecialRegsForBuildArgs (TR::Linkage *linkage, bool isFastJNI, int64_t &killMask);68virtual void addSpecialRegDepsForBuildArgs(TR::Node * callNode, TR::RegisterDependencyConditions * dependencies, int32_t& from, int32_t step);69virtual int64_t addFECustomizedReturnRegDependency(int64_t killMask, TR::Linkage* linkage, TR::DataType resType, TR::RegisterDependencyConditions * dependencies);70virtual int32_t storeExtraEnvRegForBuildArgs(TR::Node * callNode, TR::Linkage* linkage, TR::RegisterDependencyConditions * dependencies,71bool isFastJNI, int32_t stackOffset, int8_t gprSize, uint32_t &numIntegerArgs);72};7374}7576}7778#endif798081