annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotForeignCallLinkageImpl.java @ 21527:07b088d61d5d

added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Fri, 22 May 2015 23:26:20 +0200
parents 1da7aef31a08
children 5324104ac4f3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
21527
07b088d61d5d added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21526
diff changeset
2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.hotspot;
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
9743
590e157cf4d4 rename: RuntimeCallStub -> ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9742
diff changeset
25 import static com.oracle.graal.hotspot.HotSpotForeignCallLinkage.RegisterEffect.*;
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
26 import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*;
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
27
9200
9be78aeab2e1 temporaries are recorded for compiled stubs, allowing for better register allocation around calls to such stubs (GRAAL-210)
Doug Simon <doug.simon@oracle.com>
parents: 8969
diff changeset
28 import java.util.*;
9be78aeab2e1 temporaries are recorded for compiled stubs, allowing for better register allocation around calls to such stubs (GRAAL-210)
Doug Simon <doug.simon@oracle.com>
parents: 8969
diff changeset
29
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 import com.oracle.graal.api.code.*;
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
31 import com.oracle.graal.api.code.CallingConvention.Type;
7143
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
32 import com.oracle.graal.api.meta.*;
8627
75db7afee829 implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents: 7814
diff changeset
33 import com.oracle.graal.compiler.target.*;
21526
1da7aef31a08 created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 18867
diff changeset
34 import com.oracle.graal.hotspot.jvmci.*;
12456
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
35 import com.oracle.graal.hotspot.meta.*;
7143
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
36 import com.oracle.graal.hotspot.stubs.*;
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
37 import com.oracle.graal.word.*;
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39 /**
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 * The details required to link a HotSpot runtime or stub call.
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
41 */
21526
1da7aef31a08 created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 18867
diff changeset
42 public class HotSpotForeignCallLinkageImpl extends HotSpotForeignCallTarget implements HotSpotForeignCallLinkage, HotSpotProxified {
7143
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
43
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
44 /**
9352
d4684b468e93 made NewInstanceStub a RuntimeStub that directly calls the C runtime (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents: 9296
diff changeset
45 * Non-null (eventually) iff this is a call to a compiled {@linkplain Stub stub}.
7143
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
46 */
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
47 private Stub stub;
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
48
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
49 /**
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
50 * The calling convention for this call.
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
51 */
10870
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
52 private final CallingConvention outgoingCallingConvention;
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
53
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
54 /**
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
55 * The calling convention for incoming arguments to the stub, iff this call uses a compiled
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
56 * {@linkplain Stub stub}.
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
57 */
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
58 private final CallingConvention incomingCallingConvention;
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
59
9731
f7bd4594cbbf added support for declaring a foreign function call to be a leaf
Doug Simon <doug.simon@oracle.com>
parents: 9693
diff changeset
60 private final RegisterEffect effect;
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
61
9731
f7bd4594cbbf added support for declaring a foreign function call to be a leaf
Doug Simon <doug.simon@oracle.com>
parents: 9693
diff changeset
62 private final Transition transition;
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
63
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
64 /**
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
65 * The registers and stack slots defined/killed by the call.
9742
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
66 */
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
67 private Value[] temporaries = AllocatableValue.NONE;
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
68
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
69 /**
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
70 * The memory locations killed by the call.
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
71 */
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
72 private final LocationIdentity[] killedLocations;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
73
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
74 private final boolean reexecutable;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
75
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
76 /**
9740
c4b1aa93b9af rename: HotSpotRuntimeCallTarget -> HotSpotForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9739
diff changeset
77 * Creates a {@link HotSpotForeignCallLinkage}.
14955
be6fc21b25f8 Add possibility to have HotSpot linkages which are LEAF but still require a last_java_sp
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14908
diff changeset
78 *
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
79 * @param descriptor the descriptor of the call
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
80 * @param address the address of the code to call
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
81 * @param effect specifies if the call destroys or preserves all registers (apart from
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
82 * temporaries which are always destroyed)
10870
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
83 * @param outgoingCcType outgoing (caller) calling convention type
10873
de55425d3cf5 small cleanups and extra documentation around foreign call linkage
Doug Simon <doug.simon@oracle.com>
parents: 10870
diff changeset
84 * @param incomingCcType incoming (callee) calling convention type (can be null)
9870
c65bad5126b0 pull HotSpotForeignCallLinkage.isLeaf into ForeignCallLinkage and rename to canDeoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9793
diff changeset
85 * @param transition specifies if this is a {@linkplain #canDeoptimize() leaf} call
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
86 * @param reexecutable specifies if the call can be re-executed without (meaningful) side
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
87 * effects. Deoptimization will not return to a point before a call that cannot be
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
88 * re-executed.
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
89 * @param killedLocations the memory locations killed by the call
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
90 */
12456
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
91 public static HotSpotForeignCallLinkage create(MetaAccessProvider metaAccess, CodeCacheProvider codeCache, HotSpotForeignCallsProvider foreignCalls, ForeignCallDescriptor descriptor,
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
92 long address, RegisterEffect effect, Type outgoingCcType, Type incomingCcType, Transition transition, boolean reexecutable, LocationIdentity... killedLocations) {
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
93 CallingConvention outgoingCc = createCallingConvention(metaAccess, codeCache, descriptor, outgoingCcType);
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
94 CallingConvention incomingCc = incomingCcType == null ? null : createCallingConvention(metaAccess, codeCache, descriptor, incomingCcType);
18350
23a2faa68470 converted HotSpotForeignCallLinkage to an interface
Doug Simon <doug.simon@oracle.com>
parents: 16182
diff changeset
95 HotSpotForeignCallLinkageImpl linkage = new HotSpotForeignCallLinkageImpl(descriptor, address, effect, transition, outgoingCc, incomingCc, reexecutable, killedLocations);
11239
6c098f64a7a6 added support for handling volatile registers across native runtime calls
Doug Simon <doug.simon@oracle.com>
parents: 10873
diff changeset
96 if (outgoingCcType == Type.NativeCall) {
12456
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
97 linkage.temporaries = foreignCalls.getNativeABICallerSaveRegisters();
11239
6c098f64a7a6 added support for handling volatile registers across native runtime calls
Doug Simon <doug.simon@oracle.com>
parents: 10873
diff changeset
98 }
6c098f64a7a6 added support for handling volatile registers across native runtime calls
Doug Simon <doug.simon@oracle.com>
parents: 10873
diff changeset
99 return linkage;
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
100 }
9418
8d3a7fb9eb5f moved binding of parameter locations to runtime call descriptors from platform specific code to shared code for stubs that are now compiled stubs
Doug Simon <doug.simon@oracle.com>
parents: 9355
diff changeset
101
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
102 /**
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
103 * Gets a calling convention for a given descriptor and call type.
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
104 */
12456
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
105 public static CallingConvention createCallingConvention(MetaAccessProvider metaAccess, CodeCacheProvider codeCache, ForeignCallDescriptor descriptor, Type ccType) {
10873
de55425d3cf5 small cleanups and extra documentation around foreign call linkage
Doug Simon <doug.simon@oracle.com>
parents: 10870
diff changeset
106 assert ccType != null;
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
107 Class<?>[] argumentTypes = descriptor.getArgumentTypes();
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
108 JavaType[] parameterTypes = new JavaType[argumentTypes.length];
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
109 for (int i = 0; i < parameterTypes.length; ++i) {
12580
7876c59a7a2f refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents: 12464
diff changeset
110 parameterTypes[i] = asJavaType(argumentTypes[i], metaAccess, codeCache);
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
111 }
12456
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
112 TargetDescription target = codeCache.getTarget();
12580
7876c59a7a2f refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents: 12464
diff changeset
113 JavaType returnType = asJavaType(descriptor.getResultType(), metaAccess, codeCache);
12456
f87c68d79f07 improved support for co-existing, multiple backends (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
114 RegisterConfig regConfig = codeCache.getRegisterConfig();
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents: 12050
diff changeset
115 return regConfig.getCallingConvention(ccType, returnType, parameterTypes, target, false);
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
116 }
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
117
15040
288c23143d47 Fix most raw type references.
Josef Eisl <josef.eisl@jku.at>
parents: 14955
diff changeset
118 private static JavaType asJavaType(Class<?> type, MetaAccessProvider metaAccess, CodeCacheProvider codeCache) {
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
119 if (WordBase.class.isAssignableFrom(type)) {
12580
7876c59a7a2f refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents: 12464
diff changeset
120 return metaAccess.lookupJavaType(codeCache.getTarget().wordKind.toJavaClass());
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
121 } else {
12429
5124eeec1a7b split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents: 12050
diff changeset
122 return metaAccess.lookupJavaType(type);
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
123 }
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
124 }
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
125
18350
23a2faa68470 converted HotSpotForeignCallLinkage to an interface
Doug Simon <doug.simon@oracle.com>
parents: 16182
diff changeset
126 public HotSpotForeignCallLinkageImpl(ForeignCallDescriptor descriptor, long address, RegisterEffect effect, Transition transition, CallingConvention outgoingCallingConvention,
10870
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
127 CallingConvention incomingCallingConvention, boolean reexecutable, LocationIdentity... killedLocations) {
21526
1da7aef31a08 created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 18867
diff changeset
128 super(descriptor, address);
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
129 this.address = address;
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
130 this.effect = effect;
9731
f7bd4594cbbf added support for declaring a foreign function call to be a leaf
Doug Simon <doug.simon@oracle.com>
parents: 9693
diff changeset
131 this.transition = transition;
10870
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
132 this.outgoingCallingConvention = outgoingCallingConvention;
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
133 this.incomingCallingConvention = incomingCallingConvention;
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
134 this.reexecutable = reexecutable;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
135 this.killedLocations = killedLocations;
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
136 }
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
137
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
138 @Override
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
139 public String toString() {
9742
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
140 StringBuilder sb = new StringBuilder(stub == null ? descriptor.toString() : stub.toString());
10870
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
141 sb.append("@0x").append(Long.toHexString(address)).append(':').append(outgoingCallingConvention).append(":").append(incomingCallingConvention);
9742
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
142 if (temporaries != null && temporaries.length != 0) {
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
143 sb.append("; temps=");
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
144 String sep = "";
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
145 for (Value op : temporaries) {
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
146 sb.append(sep).append(op);
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
147 sep = ",";
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
148 }
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
149 }
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
150 return sb.toString();
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
151 }
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
152
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
153 public boolean isReexecutable() {
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
154 return reexecutable;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
155 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
156
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
157 public LocationIdentity[] getKilledLocations() {
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
158 return killedLocations;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
159 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9743
diff changeset
160
10870
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
161 public CallingConvention getOutgoingCallingConvention() {
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
162 return outgoingCallingConvention;
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
163 }
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
164
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
165 public CallingConvention getIncomingCallingConvention() {
886c2df7a7e4 Stubs need both an outgoing and incoming calling convention.
twisti
parents: 9870
diff changeset
166 return incomingCallingConvention;
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
167 }
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
168
9742
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
169 public Value[] getTemporaries() {
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
170 if (temporaries.length == 0) {
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
171 return temporaries;
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
172 }
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
173 return temporaries.clone();
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
174 }
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
175
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
176 public long getMaxCallTargetOffset() {
12431
7080a96be216 rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents: 12429
diff changeset
177 return runtime().getCompilerToVM().getMaxCallTargetOffset(address);
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
178 }
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
179
9735
2e4f035186cf rename: Descriptor -> ForeignCallDescriptor
Doug Simon <doug.simon@oracle.com>
parents: 9731
diff changeset
180 public ForeignCallDescriptor getDescriptor() {
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
181 return descriptor;
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
182 }
7143
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
183
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
184 public void setCompiledStub(Stub stub) {
8627
75db7afee829 implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents: 7814
diff changeset
185 assert address == 0L : "cannot set stub for linkage that already has an address: " + this;
7143
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
186 this.stub = stub;
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
187 }
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
188
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
189 /**
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
190 * Determines if this is a call to a compiled {@linkplain Stub stub}.
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
191 */
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
192 public boolean isCompiledStub() {
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
193 return address == 0L || stub != null;
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
194 }
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
195
8627
75db7afee829 implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents: 7814
diff changeset
196 public void finalizeAddress(Backend backend) {
75db7afee829 implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents: 7814
diff changeset
197 if (address == 0) {
9418
8d3a7fb9eb5f moved binding of parameter locations to runtime call descriptors from platform specific code to shared code for stubs that are now compiled stubs
Doug Simon <doug.simon@oracle.com>
parents: 9355
diff changeset
198 assert stub != null : "linkage without an address must be a stub - forgot to register a Stub associated with " + descriptor + "?";
9200
9be78aeab2e1 temporaries are recorded for compiled stubs, allowing for better register allocation around calls to such stubs (GRAAL-210)
Doug Simon <doug.simon@oracle.com>
parents: 8969
diff changeset
199 InstalledCode code = stub.getCode(backend);
9be78aeab2e1 temporaries are recorded for compiled stubs, allowing for better register allocation around calls to such stubs (GRAAL-210)
Doug Simon <doug.simon@oracle.com>
parents: 8969
diff changeset
200
9491
789cfd153265 a compiled stub can now specify whether it needs to preserve registers. If a stub does not preserve registers and assertions are enabled, then all non-temporary registers are zapped after a C runtime call from the stub.
Doug Simon <doug.simon@oracle.com>
parents: 9454
diff changeset
201 Set<Register> destroyedRegisters = stub.getDestroyedRegisters();
9742
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
202 if (!destroyedRegisters.isEmpty()) {
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
203 AllocatableValue[] temporaryLocations = new AllocatableValue[destroyedRegisters.size()];
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
204 int i = 0;
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
205 for (Register reg : destroyedRegisters) {
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
206 temporaryLocations[i++] = reg.asValue();
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
207 }
cff1e11941c0 moved temporaries from CallingConvention to ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9740
diff changeset
208 temporaries = temporaryLocations;
9200
9be78aeab2e1 temporaries are recorded for compiled stubs, allowing for better register allocation around calls to such stubs (GRAAL-210)
Doug Simon <doug.simon@oracle.com>
parents: 8969
diff changeset
209 }
9be78aeab2e1 temporaries are recorded for compiled stubs, allowing for better register allocation around calls to such stubs (GRAAL-210)
Doug Simon <doug.simon@oracle.com>
parents: 8969
diff changeset
210 address = code.getStart();
8627
75db7afee829 implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents: 7814
diff changeset
211 }
7143
445193cc2a7d added support for writing stubs in Java and wrote the TLAB fast refill stub
Doug Simon <doug.simon@oracle.com>
parents: 6534
diff changeset
212 }
8969
1fa6536416db Runtime calls that do not destroy the caller's registers need no spilling at the call site.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 8627
diff changeset
213
9452
c1ba734c1ea0 more extensive checking of compiled stub invariants
Doug Simon <doug.simon@oracle.com>
parents: 9418
diff changeset
214 public long getAddress() {
c1ba734c1ea0 more extensive checking of compiled stub invariants
Doug Simon <doug.simon@oracle.com>
parents: 9418
diff changeset
215 assert address != 0L : "address not yet finalized: " + this;
c1ba734c1ea0 more extensive checking of compiled stub invariants
Doug Simon <doug.simon@oracle.com>
parents: 9418
diff changeset
216 return address;
c1ba734c1ea0 more extensive checking of compiled stub invariants
Doug Simon <doug.simon@oracle.com>
parents: 9418
diff changeset
217 }
c1ba734c1ea0 more extensive checking of compiled stub invariants
Doug Simon <doug.simon@oracle.com>
parents: 9418
diff changeset
218
8969
1fa6536416db Runtime calls that do not destroy the caller's registers need no spilling at the call site.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 8627
diff changeset
219 @Override
9454
85a836bcd796 renaming for improved clarity: hasCall -> destroysCallerSavedRegisters
Doug Simon <doug.simon@oracle.com>
parents: 9452
diff changeset
220 public boolean destroysRegisters() {
9693
d04944441454 cleaned up and simplified runtime call mechanisms
Doug Simon <doug.simon@oracle.com>
parents: 9617
diff changeset
221 return effect == DESTROYS_REGISTERS;
9352
d4684b468e93 made NewInstanceStub a RuntimeStub that directly calls the C runtime (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents: 9296
diff changeset
222 }
9731
f7bd4594cbbf added support for declaring a foreign function call to be a leaf
Doug Simon <doug.simon@oracle.com>
parents: 9693
diff changeset
223
9870
c65bad5126b0 pull HotSpotForeignCallLinkage.isLeaf into ForeignCallLinkage and rename to canDeoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9793
diff changeset
224 @Override
c65bad5126b0 pull HotSpotForeignCallLinkage.isLeaf into ForeignCallLinkage and rename to canDeoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9793
diff changeset
225 public boolean canDeoptimize() {
13301
126ef8e8aa59 Separate foreign calls into LEAF and LEAF_NOFP.
Roland Schatz <roland.schatz@oracle.com>
parents: 12580
diff changeset
226 return transition == Transition.NOT_LEAF;
126ef8e8aa59 Separate foreign calls into LEAF and LEAF_NOFP.
Roland Schatz <roland.schatz@oracle.com>
parents: 12580
diff changeset
227 }
126ef8e8aa59 Separate foreign calls into LEAF and LEAF_NOFP.
Roland Schatz <roland.schatz@oracle.com>
parents: 12580
diff changeset
228
126ef8e8aa59 Separate foreign calls into LEAF and LEAF_NOFP.
Roland Schatz <roland.schatz@oracle.com>
parents: 12580
diff changeset
229 public boolean mayContainFP() {
126ef8e8aa59 Separate foreign calls into LEAF and LEAF_NOFP.
Roland Schatz <roland.schatz@oracle.com>
parents: 12580
diff changeset
230 return transition != Transition.LEAF_NOFP;
9731
f7bd4594cbbf added support for declaring a foreign function call to be a leaf
Doug Simon <doug.simon@oracle.com>
parents: 9693
diff changeset
231 }
14955
be6fc21b25f8 Add possibility to have HotSpot linkages which are LEAF but still require a last_java_sp
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14908
diff changeset
232
be6fc21b25f8 Add possibility to have HotSpot linkages which are LEAF but still require a last_java_sp
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14908
diff changeset
233 public boolean needsJavaFrameAnchor() {
be6fc21b25f8 Add possibility to have HotSpot linkages which are LEAF but still require a last_java_sp
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14908
diff changeset
234 return canDeoptimize() || transition == Transition.LEAF_SP;
be6fc21b25f8 Add possibility to have HotSpot linkages which are LEAF but still require a last_java_sp
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14908
diff changeset
235 }
16182
0a7e9347f8d0 Add an ability to specify the signature of a C/C++ foreign function in HotSpotVMConfig and get the full symbol string; add a couple of convenience getters and setters for stubs with foreign call linkage.
bharadwaj
parents: 15040
diff changeset
236
21527
07b088d61d5d added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21526
diff changeset
237 public String getSymbol() {
07b088d61d5d added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21526
diff changeset
238 return stub == null ? null : stub.toString();
16182
0a7e9347f8d0 Add an ability to specify the signature of a C/C++ foreign function in HotSpotVMConfig and get the full symbol string; add a couple of convenience getters and setters for stubs with foreign call linkage.
bharadwaj
parents: 15040
diff changeset
239 }
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
240 }