Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/codegen/PreprologueConst.hpp
6000 views
1
/*******************************************************************************
2
* Copyright (c) 2000, 2017 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
#if defined(TR_HOST_X86)
24
#define SAMPLING_CALL_SIZE (5)
25
#define LINKAGE_INFO_SIZE (4)
26
#if defined(TR_TARGET_64BIT)
27
#define SAVE_AREA_SIZE (2)
28
#define JITTED_BODY_INFO_SIZE (8)
29
#else
30
#define SAVE_AREA_SIZE (0)
31
#define JITTED_BODY_INFO_SIZE (4)
32
#endif
33
#elif defined(TR_TARGET_S390)
34
#if defined(TR_TARGET_64BIT)
35
// Offset from interpreter entry point to the JIT entry point save / restore location used for patching
36
#define OFFSET_INTEP_JITEP_SAVE_RESTORE_LOCATION -16
37
38
// Offset from interpreter entry point to the VM call helper trampoline
39
#define OFFSET_INTEP_VM_CALL_HELPER_TRAMPOLINE -20
40
41
// Offset from interpreter entry point to the samplingRecompileMethod trampoline
42
#define OFFSET_INTEP_SAMPLING_RECOMPILE_METHOD_TRAMPOLINE 24
43
44
// Offset from interpreter entry point to the samplingRecompileMethod address
45
#define OFFSET_INTEP_SAMPLING_RECOMPILE_METHOD_ADDRESS 32
46
47
// Offset from JIT entry point to the countingPatchCallSite snippet start
48
#define OFFSET_JITEP_COUNTING_PATCH_CALL_SITE_SNIPPET_START 72
49
50
// Offset from JIT entry point to the countingPatchCallSite snippet end
51
#define OFFSET_JITEP_COUNTING_PATCH_CALL_SITE_SNIPPET_END 124
52
53
// Size in bytes of the counting prologue
54
#define COUNTING_PROLOGUE_SIZE 134
55
#else
56
// Offset from interpreter entry point to the JIT entry point save / restore location used for patching
57
#define OFFSET_INTEP_JITEP_SAVE_RESTORE_LOCATION -12
58
59
// Offset from interpreter entry point to the VM call helper trampoline
60
#define OFFSET_INTEP_VM_CALL_HELPER_TRAMPOLINE -16
61
62
// Offset from interpreter entry point to the samplingRecompileMethod trampoline
63
#define OFFSET_INTEP_SAMPLING_RECOMPILE_METHOD_TRAMPOLINE 20
64
65
// Offset from interpreter entry point to the samplingRecompileMethod address
66
#define OFFSET_INTEP_SAMPLING_RECOMPILE_METHOD_ADDRESS 24
67
68
// Offset from JIT entry point to the countingPatchCallSite snippet start
69
#define OFFSET_JITEP_COUNTING_PATCH_CALL_SITE_SNIPPET_START 58
70
71
// Offset from JIT entry point to the countingPatchCallSite snippet end
72
#define OFFSET_JITEP_COUNTING_PATCH_CALL_SITE_SNIPPET_END 96
73
74
// Size in bytes of the counting prologue
75
#define COUNTING_PROLOGUE_SIZE 104
76
#endif
77
#endif
78
79