Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/z/codegen/J9SystemLinkagezOS.hpp
6004 views
1
/*******************************************************************************
2
* Copyright (c) 2000, 2020 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 J9_Z_SYSTEMLINKAGEZOS_INCL
24
#define J9_Z_SYSTEMLINKAGEZOS_INCL
25
26
#include "z/codegen/SystemLinkage.hpp"
27
#include "z/codegen/SystemLinkagezOS.hpp"
28
29
#include <stdint.h>
30
#include "env/jittypes.h"
31
32
namespace TR { class CodeGenerator; }
33
namespace TR { class Linkage; }
34
namespace TR { class Register; }
35
namespace TR { class RegisterDependencyConditions; }
36
namespace TR { class SystemLinkage; }
37
38
namespace J9
39
{
40
41
namespace Z
42
{
43
44
class zOSSystemLinkage : public TR::S390zOSSystemLinkage
45
{
46
public:
47
zOSSystemLinkage(TR::CodeGenerator * cg);
48
49
virtual void generateInstructionsForCall(TR::Node * callNode, TR::RegisterDependencyConditions * dependencies,
50
intptr_t targetAddress, TR::Register * methodAddressReg, TR::Register * javaLitOffsetReg, TR::LabelSymbol * returnFromJNICallLabel,
51
TR::Snippet * callDataSnippet, bool isJNIGCPoint = true);
52
53
54
55
// this set of 3 method called by buildNative Dispatch is the same as the J9S390zLinux methods above
56
// omr todo: need to find a better way instead of duplicating them
57
virtual void setupRegisterDepForLinkage(TR::Node *, TR_DispatchType, TR::RegisterDependencyConditions * &,
58
int64_t &, TR::SystemLinkage *, TR::Node * &, bool &, TR::Register **, TR::Register *&);
59
60
virtual void setupBuildArgForLinkage(TR::Node *, TR_DispatchType, TR::RegisterDependencyConditions *, bool, bool,
61
int64_t &, TR::Node *, bool, TR::SystemLinkage *);
62
63
virtual void performCallNativeFunctionForLinkage(TR::Node *, TR_DispatchType, TR::Register *&, TR::SystemLinkage *,
64
TR::RegisterDependencyConditions *&, TR::Register *, TR::Register *, bool);
65
66
//called by buildArgs, same as J9S390zLinux methods above
67
// omr todo: need to find a better way instead of duplicating them
68
virtual void doNotKillSpecialRegsForBuildArgs (TR::Linkage *linkage, bool isFastJNI, int64_t &killMask);
69
virtual void addSpecialRegDepsForBuildArgs(TR::Node * callNode, TR::RegisterDependencyConditions * dependencies, int32_t& from, int32_t step);
70
virtual int64_t addFECustomizedReturnRegDependency(int64_t killMask, TR::Linkage* linkage, TR::DataType resType, TR::RegisterDependencyConditions * dependencies);
71
virtual int32_t storeExtraEnvRegForBuildArgs(TR::Node * callNode, TR::Linkage* linkage, TR::RegisterDependencyConditions * dependencies,
72
bool isFastJNI, int32_t stackOffset, int8_t gprSize, uint32_t &numIntegerArgs);
73
};
74
75
}
76
77
}
78
79
#endif
80
81