Path: blob/master/runtime/compiler/arm/codegen/ARMJNILinkage.hpp
6004 views
/*******************************************************************************1* Copyright (c) 2016, 2021 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 ARM_JNILINKAGE_INCL23#define ARM_JNILINKAGE_INCL2425#include "codegen/ARMPrivateLinkage.hpp"2627#include <stdint.h>28#include "codegen/Linkage.hpp"29#include "infra/Assert.hpp"3031namespace TR { class ARMMemoryArgument; }32namespace TR { class MemoryReference; }33namespace TR { class Node; }34namespace TR { class Register; }35namespace TR { class RegisterDependencyConditions; }3637namespace J938{3940namespace ARM41{4243class JNILinkage : public PrivateLinkage44{45public:4647JNILinkage(TR::CodeGenerator *codeGen);4849virtual TR::MemoryReference *getOutgoingArgumentMemRef(int32_t totalParmAreaSize,50int32_t argOffset,51TR::Register *argReg,52TR::InstOpCode::Mnemonic opCode,53TR::ARMMemoryArgument &memArg);5455virtual TR::ARMLinkageProperties& getProperties();56#if defined(__VFP_FP__) && !defined(__SOFTFP__)57TR::Register *pushFloatArgForJNI(TR::Node *child);58TR::Register *pushDoubleArgForJNI(TR::Node *child);59#endif6061virtual int32_t buildJNIArgs(TR::Node *callNode,62TR::RegisterDependencyConditions *dependencies,63TR::Register* &vftReg,64bool passReceiver = true,65bool passEnvArg = true);6667virtual int32_t buildArgs(TR::Node *callNode,68TR::RegisterDependencyConditions *dependencies,69TR::Register* &vftReg,70bool isVirtual);7172virtual void buildVirtualDispatch(TR::Node *callNode,73TR::RegisterDependencyConditions *dependencies,74TR::RegisterDependencyConditions *postDeps,75TR::Register *vftReg,76uint32_t sizeOfArguments);7778virtual TR::Register *buildDirectDispatch(TR::Node *callNode);79virtual TR::Register *buildIndirectDispatch(TR::Node *callNode);8081private:82TR::ARMLinkageProperties _properties;83};8485}8687}8889#endif909192