Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/arm/codegen/ARMPrivateLinkage.hpp
6004 views
1
/*******************************************************************************
2
* Copyright (c) 2000, 2021 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* 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-exception
21
*******************************************************************************/
22
23
#ifndef ARM_PRIVATELINKAGE_INCL
24
#define ARM_PRIVATELINKAGE_INCL
25
26
#include "codegen/PrivateLinkage.hpp"
27
#include "infra/Assert.hpp"
28
29
namespace TR { class CodeGenerator; }
30
namespace TR { class Instruction; }
31
namespace TR { class Register; }
32
33
namespace J9
34
{
35
36
namespace ARM
37
{
38
39
class PrivateLinkage : public J9::PrivateLinkage
40
{
41
static TR::ARMLinkageProperties properties;
42
43
public:
44
45
PrivateLinkage(TR::CodeGenerator *cg);
46
47
virtual uint32_t getRightToLeft();
48
virtual void mapStack(TR::ResolvedMethodSymbol *method);
49
virtual void mapSingleAutomatic(TR::AutomaticSymbol *p, uint32_t &stackIndex);
50
virtual void initARMRealRegisterLinkage();
51
virtual void setParameterLinkageRegisterIndex(TR::ResolvedMethodSymbol *method);
52
53
virtual TR::MemoryReference *getOutgoingArgumentMemRef(int32_t totalParmAreaSize,
54
int32_t argOffset,
55
TR::Register *argReg,
56
TR::InstOpCode::Mnemonic opCode,
57
TR::ARMMemoryArgument &memArg);
58
59
virtual TR::ARMLinkageProperties& getProperties();
60
61
virtual void createPrologue(TR::Instruction *cursor);
62
virtual void createEpilogue(TR::Instruction *cursor);
63
64
virtual int32_t buildArgs(TR::Node *callNode,
65
TR::RegisterDependencyConditions *dependencies,
66
TR::Register* &vftReg,
67
bool isVirtual);
68
69
virtual void buildVirtualDispatch(TR::Node *callNode,
70
TR::RegisterDependencyConditions *dependencies,
71
TR::RegisterDependencyConditions *postDeps,
72
TR::Register *vftReg,
73
uint32_t sizeOfArguments);
74
75
virtual TR::Register *buildDirectDispatch(TR::Node *callNode);
76
virtual TR::Register *buildIndirectDispatch(TR::Node *callNode);
77
};
78
79
80
class HelperLinkage : public PrivateLinkage
81
{
82
public:
83
84
HelperLinkage(TR::CodeGenerator *codeGen) : PrivateLinkage(codeGen) {}
85
86
virtual int32_t buildArgs(TR::Node *callNode,
87
TR::RegisterDependencyConditions *dependencies,
88
TR::Register* &vftReg,
89
bool isVirtual);
90
};
91
92
}
93
94
}
95
96
#endif
97
98