Mercurial > hg > graal-jvmci-8
annotate graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java @ 12502:28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 21 Oct 2013 17:42:42 +0200 |
parents | 7080a96be216 |
children | 86c74ef1b6f5 |
rev | line source |
---|---|
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 */ |
6495
75f130f2b30f
moved AMD64 specific HotSpot code in com.oracle.graal.hotspot.amd64 project
Doug Simon <doug.simon@oracle.com>
parents:
6494
diff
changeset
|
23 package com.oracle.graal.hotspot.amd64; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
6580
d56d600819fe
moved AMD64 into its own (new) project: com.oracle.graal.amd64
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
25 import static com.oracle.graal.amd64.AMD64.*; |
5547
b6617d13ea44
Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5541
diff
changeset
|
26 import static com.oracle.graal.api.code.CallingConvention.Type.*; |
b6617d13ea44
Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5541
diff
changeset
|
27 import static com.oracle.graal.api.code.ValueUtil.*; |
8290
9882af5c8504
AMD64 HotSpot backend now models RBP as an incoming parameter that must be preserved until the end of the method. For non-leaf methods, the value is preserved in the special stack slot required by the HotSpot runtime for walking/inspecting frames of such methods.
Doug Simon <doug.simon@oracle.com>
parents:
8282
diff
changeset
|
28 import static com.oracle.graal.phases.GraalOptions.*; |
9621
e97dc9bbfedc
introduced installedCodeOwner parameter of type ResolvedJavaMethod to GraalCompiler.compileGraph to properly distinguish the source method of a graph from the method under which the code compiled for the graph will be installed
Doug Simon <doug.simon@oracle.com>
parents:
9615
diff
changeset
|
29 import static java.lang.reflect.Modifier.*; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
30 |
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:
8370
diff
changeset
|
31 import java.util.*; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
32 |
7841
674a8b9e62f8
Remove unused fields in TargetDescription. Use Unsafe.pageSize().
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7839
diff
changeset
|
33 import sun.misc.*; |
674a8b9e62f8
Remove unused fields in TargetDescription. Use Unsafe.pageSize().
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7839
diff
changeset
|
34 |
6580
d56d600819fe
moved AMD64 into its own (new) project: com.oracle.graal.amd64
Doug Simon <doug.simon@oracle.com>
parents:
6539
diff
changeset
|
35 import com.oracle.graal.amd64.*; |
5510
426c605c9d3c
Move cri.ci to api.code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5507
diff
changeset
|
36 import com.oracle.graal.api.code.*; |
5507
dc71b06d09f8
Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5506
diff
changeset
|
37 import com.oracle.graal.api.meta.*; |
6531
4afe23aa0a00
renamed packages: com.oracle.max.asm... -> com.oracle.graal.asm...
Doug Simon <doug.simon@oracle.com>
parents:
6525
diff
changeset
|
38 import com.oracle.graal.asm.*; |
8167
7f57c30575c8
Make AMD64Address a low-level representation for use by the assembler only.
Roland Schatz <roland.schatz@oracle.com>
parents:
8166
diff
changeset
|
39 import com.oracle.graal.asm.amd64.*; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6676
diff
changeset
|
40 import com.oracle.graal.asm.amd64.AMD64Assembler.ConditionFlag; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
41 import com.oracle.graal.compiler.gen.*; |
12502
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
42 import com.oracle.graal.compiler.target.*; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
43 import com.oracle.graal.hotspot.*; |
6462 | 44 import com.oracle.graal.hotspot.bridge.*; |
5548
8872bc0eebdf
Renaming hotspot.ri => hotspot.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5547
diff
changeset
|
45 import com.oracle.graal.hotspot.meta.*; |
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:
8370
diff
changeset
|
46 import com.oracle.graal.hotspot.stubs.*; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
47 import com.oracle.graal.lir.*; |
9456
21ccdce289b2
moved declaration of EXCEPTION_HANDLER, DEOPT_HANDLER and IC_MISS_HANDLER descriptors to platform independent code
Doug Simon <doug.simon@oracle.com>
parents:
9451
diff
changeset
|
48 import com.oracle.graal.lir.LIRInstruction.ValueProcedure; |
11537
7ce08e264abf
Fixed registers that flow into a block need to be inputs of the LabelOp, otherwise the register allocator can insert spill moves before the definition of a fixed register.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
11474
diff
changeset
|
49 import com.oracle.graal.lir.StandardOp.LabelOp; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
50 import com.oracle.graal.lir.amd64.*; |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
51 import com.oracle.graal.lir.asm.*; |
5236
f9aae727d035
removed XIR safepoint operation
Doug Simon <doug.simon@oracle.com>
parents:
5235
diff
changeset
|
52 import com.oracle.graal.nodes.*; |
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:
8370
diff
changeset
|
53 import com.oracle.graal.nodes.cfg.*; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
54 |
5844
a432e6d43aa1
fixed bugs related to -G:+InlineVTableStubs and re-enabled it by default
Doug Simon <doug.simon@oracle.com>
parents:
5841
diff
changeset
|
55 /** |
a432e6d43aa1
fixed bugs related to -G:+InlineVTableStubs and re-enabled it by default
Doug Simon <doug.simon@oracle.com>
parents:
5841
diff
changeset
|
56 * HotSpot AMD64 specific backend. |
a432e6d43aa1
fixed bugs related to -G:+InlineVTableStubs and re-enabled it by default
Doug Simon <doug.simon@oracle.com>
parents:
5841
diff
changeset
|
57 */ |
6494
df02fa2bce58
refactored all AMD64 specific HotSpot code in com.oracle.graal.hotspot.target.amd64 package
Doug Simon <doug.simon@oracle.com>
parents:
6493
diff
changeset
|
58 public class AMD64HotSpotBackend extends HotSpotBackend { |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
59 |
7841
674a8b9e62f8
Remove unused fields in TargetDescription. Use Unsafe.pageSize().
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7839
diff
changeset
|
60 private static final Unsafe unsafe = Unsafe.getUnsafe(); |
7814
bab2a51f8dbe
Introduce marker interface InvokeTarget. Remove method lookupRuntimeCall from CodeCacheProvider.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7809
diff
changeset
|
61 |
12431
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
12429
diff
changeset
|
62 public AMD64HotSpotBackend(HotSpotGraalRuntime runtime, HotSpotProviders providers) { |
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
12429
diff
changeset
|
63 super(runtime, providers); |
6483
e11b2c8f374b
modified NewInstanceStubCall to use information provided by the (platform independent) backend instead of AMD64 specific nodes for linking the stub call
Doug Simon <doug.simon@oracle.com>
parents:
6482
diff
changeset
|
64 } |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
65 |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
66 @Override |
11775
b04b94b71649
Finished PTX assembler and Register -> Variable conversion
Morris Meyer <morris.meyer@oracle.com>
parents:
11537
diff
changeset
|
67 public boolean shouldAllocateRegisters() { |
b04b94b71649
Finished PTX assembler and Register -> Variable conversion
Morris Meyer <morris.meyer@oracle.com>
parents:
11537
diff
changeset
|
68 return true; |
b04b94b71649
Finished PTX assembler and Register -> Variable conversion
Morris Meyer <morris.meyer@oracle.com>
parents:
11537
diff
changeset
|
69 } |
b04b94b71649
Finished PTX assembler and Register -> Variable conversion
Morris Meyer <morris.meyer@oracle.com>
parents:
11537
diff
changeset
|
70 |
b04b94b71649
Finished PTX assembler and Register -> Variable conversion
Morris Meyer <morris.meyer@oracle.com>
parents:
11537
diff
changeset
|
71 @Override |
10956 | 72 public FrameMap newFrameMap() { |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
73 return new AMD64FrameMap(getCodeCache()); |
10956 | 74 } |
75 | |
76 @Override | |
9613
0c17815817a4
removed LIRGenerator.method field
Doug Simon <doug.simon@oracle.com>
parents:
9612
diff
changeset
|
77 public LIRGenerator newLIRGenerator(StructuredGraph graph, FrameMap frameMap, CallingConvention cc, LIR lir) { |
12431
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
12429
diff
changeset
|
78 return new AMD64HotSpotLIRGenerator(graph, getProviders(), getRuntime().getConfig(), frameMap, cc, lir); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
79 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
80 |
7808
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
81 /** |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
82 * Emits code to do stack overflow checking. |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
83 * |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
84 * @param afterFrameInit specifies if the stack pointer has already been adjusted to allocate |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
85 * the current frame |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
86 */ |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
87 protected static void emitStackOverflowCheck(TargetMethodAssembler tasm, boolean afterFrameInit) { |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9739
diff
changeset
|
88 if (StackShadowPages.getValue() > 0) { |
7808
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
89 |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
90 AMD64MacroAssembler asm = (AMD64MacroAssembler) tasm.asm; |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
91 int frameSize = tasm.frameMap.frameSize(); |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
92 if (frameSize > 0) { |
7841
674a8b9e62f8
Remove unused fields in TargetDescription. Use Unsafe.pageSize().
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7839
diff
changeset
|
93 int lastFramePage = frameSize / unsafe.pageSize(); |
7808
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
94 // emit multiple stack bangs for methods with frames larger than a page |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
95 for (int i = 0; i <= lastFramePage; i++) { |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9739
diff
changeset
|
96 int disp = (i + StackShadowPages.getValue()) * unsafe.pageSize(); |
7808
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
97 if (afterFrameInit) { |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
98 disp -= frameSize; |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
99 } |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
100 tasm.blockComment("[stack overflow check]"); |
8167
7f57c30575c8
Make AMD64Address a low-level representation for use by the assembler only.
Roland Schatz <roland.schatz@oracle.com>
parents:
8166
diff
changeset
|
101 asm.movq(new AMD64Address(rsp, -disp), AMD64.rax); |
7808
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
102 } |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
103 } |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
104 } |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
105 } |
932a45568706
Move stack banging code to the AMD64-specific code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7530
diff
changeset
|
106 |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
107 class HotSpotFrameContext implements FrameContext { |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
108 |
9451
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
109 final boolean isStub; |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
110 |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
111 HotSpotFrameContext(boolean isStub) { |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
112 this.isStub = isStub; |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
113 } |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
114 |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
115 @Override |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
116 public void enter(TargetMethodAssembler tasm) { |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
117 FrameMap frameMap = tasm.frameMap; |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
118 int frameSize = frameMap.frameSize(); |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
119 |
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
120 AMD64MacroAssembler asm = (AMD64MacroAssembler) tasm.asm; |
9451
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
121 if (!isStub) { |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
122 emitStackOverflowCheck(tasm, false); |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
123 } |
8290
9882af5c8504
AMD64 HotSpot backend now models RBP as an incoming parameter that must be preserved until the end of the method. For non-leaf methods, the value is preserved in the special stack slot required by the HotSpot runtime for walking/inspecting frames of such methods.
Doug Simon <doug.simon@oracle.com>
parents:
8282
diff
changeset
|
124 asm.decrementq(rsp, frameSize); |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9739
diff
changeset
|
125 if (ZapStackOnMethodEntry.getValue()) { |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
126 final int intSize = 4; |
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
127 for (int i = 0; i < frameSize / intSize; ++i) { |
8167
7f57c30575c8
Make AMD64Address a low-level representation for use by the assembler only.
Roland Schatz <roland.schatz@oracle.com>
parents:
8166
diff
changeset
|
128 asm.movl(new AMD64Address(rsp, i * intSize), 0xC1C1C1C1); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
129 } |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
130 } |
5547
b6617d13ea44
Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5541
diff
changeset
|
131 CalleeSaveLayout csl = frameMap.registerConfig.getCalleeSaveLayout(); |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
132 if (csl != null && csl.size != 0) { |
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
133 int frameToCSA = frameMap.offsetToCalleeSaveArea(); |
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
134 assert frameToCSA >= 0; |
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
135 asm.save(csl, frameToCSA); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
136 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
137 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
138 |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
139 @Override |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
140 public void leave(TargetMethodAssembler tasm) { |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
141 int frameSize = tasm.frameMap.frameSize(); |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
142 AMD64MacroAssembler asm = (AMD64MacroAssembler) tasm.asm; |
5547
b6617d13ea44
Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5541
diff
changeset
|
143 CalleeSaveLayout csl = tasm.frameMap.registerConfig.getCalleeSaveLayout(); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
144 |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
145 if (csl != null && csl.size != 0) { |
7809
0fb4d10bd256
Small clean up of assembler and LIR.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7808
diff
changeset
|
146 tasm.compilationResult.setRegisterRestoreEpilogueOffset(asm.codeBuffer.position()); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
147 // saved all registers, restore all registers |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
148 int frameToCSA = tasm.frameMap.offsetToCalleeSaveArea(); |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
149 asm.restore(csl, frameToCSA); |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
150 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
151 |
8290
9882af5c8504
AMD64 HotSpot backend now models RBP as an incoming parameter that must be preserved until the end of the method. For non-leaf methods, the value is preserved in the special stack slot required by the HotSpot runtime for walking/inspecting frames of such methods.
Doug Simon <doug.simon@oracle.com>
parents:
8282
diff
changeset
|
152 asm.incrementq(rsp, frameSize); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
153 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
154 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
155 |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
156 @Override |
9432
6680389bd36f
Make assembler creation in backend more extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
9415
diff
changeset
|
157 protected AbstractAssembler createAssembler(FrameMap frameMap) { |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
158 return new AMD64MacroAssembler(getTarget(), frameMap.registerConfig); |
9432
6680389bd36f
Make assembler creation in backend more extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
9415
diff
changeset
|
159 } |
6680389bd36f
Make assembler creation in backend more extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
9415
diff
changeset
|
160 |
6680389bd36f
Make assembler creation in backend more extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
9415
diff
changeset
|
161 @Override |
8281
8fde1be81b2d
LIRGenerator is transmitted across backend passes instead of just the LIR so that backend-specific, per-compilation information can be attached to the backend-specific LIRGenerator object
Doug Simon <doug.simon@oracle.com>
parents:
8217
diff
changeset
|
162 public TargetMethodAssembler newAssembler(LIRGenerator lirGen, CompilationResult compilationResult) { |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
163 // Omit the frame if the method: |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7300
diff
changeset
|
164 // - has no spill slots or other slots allocated during register allocation |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7300
diff
changeset
|
165 // - has no callee-saved registers |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7300
diff
changeset
|
166 // - has no incoming arguments passed on the stack |
10761
dd7a8807378b
cannot omit frame for compiled methods that make a foreign call (GRAAL-362)
Doug Simon <doug.simon@oracle.com>
parents:
10732
diff
changeset
|
167 // - has no deoptimization points |
dd7a8807378b
cannot omit frame for compiled methods that make a foreign call (GRAAL-362)
Doug Simon <doug.simon@oracle.com>
parents:
10732
diff
changeset
|
168 // - makes no foreign calls (which require an aligned stack) |
8367
ae15e5d0571b
rename: HotSpotAMD64LIRGenerator -> AMD64HotSpotLIRGenerator
Doug Simon <doug.simon@oracle.com>
parents:
8334
diff
changeset
|
169 AMD64HotSpotLIRGenerator gen = (AMD64HotSpotLIRGenerator) lirGen; |
8290
9882af5c8504
AMD64 HotSpot backend now models RBP as an incoming parameter that must be preserved until the end of the method. For non-leaf methods, the value is preserved in the special stack slot required by the HotSpot runtime for walking/inspecting frames of such methods.
Doug Simon <doug.simon@oracle.com>
parents:
8282
diff
changeset
|
170 FrameMap frameMap = gen.frameMap; |
9882af5c8504
AMD64 HotSpot backend now models RBP as an incoming parameter that must be preserved until the end of the method. For non-leaf methods, the value is preserved in the special stack slot required by the HotSpot runtime for walking/inspecting frames of such methods.
Doug Simon <doug.simon@oracle.com>
parents:
8282
diff
changeset
|
171 LIR lir = gen.lir; |
10761
dd7a8807378b
cannot omit frame for compiled methods that make a foreign call (GRAAL-362)
Doug Simon <doug.simon@oracle.com>
parents:
10732
diff
changeset
|
172 assert gen.deoptimizationRescueSlot == null || frameMap.frameNeedsAllocating() : "method that can deoptimize must have a frame"; |
dd7a8807378b
cannot omit frame for compiled methods that make a foreign call (GRAAL-362)
Doug Simon <doug.simon@oracle.com>
parents:
10732
diff
changeset
|
173 boolean omitFrame = CanOmitFrame.getValue() && !frameMap.frameNeedsAllocating() && !lir.hasArgInCallerFrame() && !gen.hasForeignCall(); |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
174 |
9613
0c17815817a4
removed LIRGenerator.method field
Doug Simon <doug.simon@oracle.com>
parents:
9612
diff
changeset
|
175 Stub stub = gen.getStub(); |
9432
6680389bd36f
Make assembler creation in backend more extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
9415
diff
changeset
|
176 AbstractAssembler masm = createAssembler(frameMap); |
9451
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
177 HotSpotFrameContext frameContext = omitFrame ? null : new HotSpotFrameContext(stub != null); |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
178 TargetMethodAssembler tasm = new TargetMethodAssembler(getCodeCache(), getForeignCalls(), frameMap, masm, frameContext, compilationResult); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
179 tasm.setFrameSize(frameMap.frameSize()); |
8290
9882af5c8504
AMD64 HotSpot backend now models RBP as an incoming parameter that must be preserved until the end of the method. For non-leaf methods, the value is preserved in the special stack slot required by the HotSpot runtime for walking/inspecting frames of such methods.
Doug Simon <doug.simon@oracle.com>
parents:
8282
diff
changeset
|
180 StackSlot deoptimizationRescueSlot = gen.deoptimizationRescueSlot; |
9451
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
181 if (deoptimizationRescueSlot != null && stub == null) { |
8282
59744882ddeb
moved logic for reserving a special area/slot in a frame (e.g., for use during deoptimization) out of FrameMap and into platform specific backend class
Doug Simon <doug.simon@oracle.com>
parents:
8281
diff
changeset
|
182 tasm.compilationResult.setCustomStackAreaOffset(frameMap.offsetForStackSlot(deoptimizationRescueSlot)); |
59744882ddeb
moved logic for reserving a special area/slot in a frame (e.g., for use during deoptimization) out of FrameMap and into platform specific backend class
Doug Simon <doug.simon@oracle.com>
parents:
8281
diff
changeset
|
183 } |
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:
8370
diff
changeset
|
184 |
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:
8370
diff
changeset
|
185 if (stub != null) { |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
186 |
9415
016523a011b7
simplified register preservation in compiled stubs to avoid the need for using ParametersOp
Doug Simon <doug.simon@oracle.com>
parents:
9338
diff
changeset
|
187 final Set<Register> definedRegisters = gatherDefinedRegisters(lir); |
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:
9459
diff
changeset
|
188 stub.initDestroyedRegisters(definedRegisters); |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
189 |
9415
016523a011b7
simplified register preservation in compiled stubs to avoid the need for using ParametersOp
Doug Simon <doug.simon@oracle.com>
parents:
9338
diff
changeset
|
190 // Eliminate unnecessary register preservation and |
016523a011b7
simplified register preservation in compiled stubs to avoid the need for using ParametersOp
Doug Simon <doug.simon@oracle.com>
parents:
9338
diff
changeset
|
191 // record where preserved registers are saved |
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:
9459
diff
changeset
|
192 for (Map.Entry<LIRFrameState, AMD64RegistersPreservationOp> e : gen.calleeSaveInfo.entrySet()) { |
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:
9459
diff
changeset
|
193 AMD64RegistersPreservationOp save = e.getValue(); |
10666
9808158cfeab
Allow foreign call stubs to be declared as leaf methods.
Roland Schatz <roland.schatz@oracle.com>
parents:
9864
diff
changeset
|
194 DebugInfo info = e.getKey() == null ? null : e.getKey().debugInfo(); |
9808158cfeab
Allow foreign call stubs to be declared as leaf methods.
Roland Schatz <roland.schatz@oracle.com>
parents:
9864
diff
changeset
|
195 save.update(definedRegisters, info, frameMap); |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
196 } |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
197 } |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
198 |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
199 return tasm; |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
200 } |
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:
8370
diff
changeset
|
201 |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
202 /** |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
203 * Finds all the registers that are defined by some given LIR. |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
204 * |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
205 * @param lir the LIR to examine |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
206 * @return the registers that are defined by or used as temps for any instruction in {@code lir} |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
207 */ |
9415
016523a011b7
simplified register preservation in compiled stubs to avoid the need for using ParametersOp
Doug Simon <doug.simon@oracle.com>
parents:
9338
diff
changeset
|
208 private static Set<Register> gatherDefinedRegisters(LIR lir) { |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
209 final Set<Register> definedRegisters = new HashSet<>(); |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
210 ValueProcedure defProc = new ValueProcedure() { |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
211 |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
212 @Override |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
213 public Value doValue(Value value) { |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
214 if (ValueUtil.isRegister(value)) { |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
215 final Register reg = ValueUtil.asRegister(value); |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
216 definedRegisters.add(reg); |
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:
8370
diff
changeset
|
217 } |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
218 return value; |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
219 } |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
220 }; |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
221 for (Block block : lir.codeEmittingOrder()) { |
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
222 for (LIRInstruction op : lir.lir(block)) { |
11537
7ce08e264abf
Fixed registers that flow into a block need to be inputs of the LabelOp, otherwise the register allocator can insert spill moves before the definition of a fixed register.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
11474
diff
changeset
|
223 if (op instanceof LabelOp) { |
9415
016523a011b7
simplified register preservation in compiled stubs to avoid the need for using ParametersOp
Doug Simon <doug.simon@oracle.com>
parents:
9338
diff
changeset
|
224 // Don't consider this as a definition |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
225 } else { |
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:
8370
diff
changeset
|
226 op.forEachTemp(defProc); |
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:
8370
diff
changeset
|
227 op.forEachOutput(defProc); |
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:
8370
diff
changeset
|
228 } |
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:
8370
diff
changeset
|
229 } |
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:
8370
diff
changeset
|
230 } |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9200
diff
changeset
|
231 return definedRegisters; |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
232 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
233 |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
234 @Override |
9621
e97dc9bbfedc
introduced installedCodeOwner parameter of type ResolvedJavaMethod to GraalCompiler.compileGraph to properly distinguish the source method of a graph from the method under which the code compiled for the graph will be installed
Doug Simon <doug.simon@oracle.com>
parents:
9615
diff
changeset
|
235 public void emitCode(TargetMethodAssembler tasm, LIRGenerator lirGen, ResolvedJavaMethod installedCodeOwner) { |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
236 AMD64MacroAssembler asm = (AMD64MacroAssembler) tasm.asm; |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
237 FrameMap frameMap = tasm.frameMap; |
5547
b6617d13ea44
Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5541
diff
changeset
|
238 RegisterConfig regConfig = frameMap.registerConfig; |
12431
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
12429
diff
changeset
|
239 HotSpotVMConfig config = getRuntime().getConfig(); |
11825
463f51256c86
AMD64HotSpot: emit jump to IC miss handler directly instead of emitting it inside verfied_entry
Bernhard Urban <bernhard.urban@jku.at>
parents:
11775
diff
changeset
|
240 Label verifiedStub = new Label(); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
241 |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
242 // Emit the prefix |
12502
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
243 emitCodePrefix(installedCodeOwner, tasm, asm, regConfig, config, verifiedStub); |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
244 |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
245 // Emit code for the LIR |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
246 emitCodeBody(installedCodeOwner, tasm, lirGen); |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
247 |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
248 // Emit the suffix |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
249 emitCodeSuffix(installedCodeOwner, tasm, lirGen, asm, frameMap); |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
250 } |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
251 |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
252 /** |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
253 * @param installedCodeOwner see {@link Backend#emitCode} |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
254 */ |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
255 protected void emitCodePrefix(ResolvedJavaMethod installedCodeOwner, TargetMethodAssembler tasm, AMD64MacroAssembler asm, RegisterConfig regConfig, HotSpotVMConfig config, Label verifiedStub) { |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
256 HotSpotProviders providers = getProviders(); |
11825
463f51256c86
AMD64HotSpot: emit jump to IC miss handler directly instead of emitting it inside verfied_entry
Bernhard Urban <bernhard.urban@jku.at>
parents:
11775
diff
changeset
|
257 if (installedCodeOwner != null && !isStatic(installedCodeOwner.getModifiers())) { |
6462 | 258 tasm.recordMark(Marks.MARK_UNVERIFIED_ENTRY); |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
259 CallingConvention cc = regConfig.getCallingConvention(JavaCallee, null, new JavaType[]{providers.getMetaAccess().lookupJavaType(Object.class)}, getTarget(), false); |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7300
diff
changeset
|
260 Register inlineCacheKlass = rax; // see definition of IC_Klass in |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7300
diff
changeset
|
261 // c1_LIRAssembler_x86.cpp |
6470
b1010f7bc0bf
expanded CallingConvention API class to also include the location of the value (if any) returned by a call
Doug Simon <doug.simon@oracle.com>
parents:
6462
diff
changeset
|
262 Register receiver = asRegister(cc.getArgument(0)); |
8167
7f57c30575c8
Make AMD64Address a low-level representation for use by the assembler only.
Roland Schatz <roland.schatz@oracle.com>
parents:
8166
diff
changeset
|
263 AMD64Address src = new AMD64Address(receiver, config.hubOffset); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
264 |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
265 if (config.useCompressedClassPointers) { |
10732
0bd794eb8222
Add compressed oop support in HotSpot Backend
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10666
diff
changeset
|
266 Register register = r10; |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
267 AMD64HotSpotMove.decodeKlassPointer(asm, register, providers.getRegisters().getHeapBaseRegister(), src, config.narrowKlassBase, config.narrowOopBase, config.narrowKlassShift, |
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
268 config.logKlassAlignment); |
10732
0bd794eb8222
Add compressed oop support in HotSpot Backend
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10666
diff
changeset
|
269 asm.cmpq(inlineCacheKlass, register); |
0bd794eb8222
Add compressed oop support in HotSpot Backend
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10666
diff
changeset
|
270 } else { |
0bd794eb8222
Add compressed oop support in HotSpot Backend
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10666
diff
changeset
|
271 asm.cmpq(inlineCacheKlass, src); |
0bd794eb8222
Add compressed oop support in HotSpot Backend
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10666
diff
changeset
|
272 } |
12363
78e5badf4b8e
moved lookupForeignCall() from CodeCacheProvider to ForeignCallsProvider (GRAAL-511)
Doug Simon <doug.simon@oracle.com>
parents:
12358
diff
changeset
|
273 AMD64Call.directConditionalJmp(tasm, asm, getForeignCalls().lookupForeignCall(IC_MISS_HANDLER), ConditionFlag.NotEqual); |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
274 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
275 |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
276 asm.align(config.codeEntryAlignment); |
6676
090868cbcda6
Graal infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6675
diff
changeset
|
277 tasm.recordMark(Marks.MARK_OSR_ENTRY); |
11825
463f51256c86
AMD64HotSpot: emit jump to IC miss handler directly instead of emitting it inside verfied_entry
Bernhard Urban <bernhard.urban@jku.at>
parents:
11775
diff
changeset
|
278 asm.bind(verifiedStub); |
6462 | 279 tasm.recordMark(Marks.MARK_VERIFIED_ENTRY); |
12502
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
280 } |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
281 |
12502
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
282 /** |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
283 * @param installedCodeOwner see {@link Backend#emitCode} |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
284 */ |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
285 protected void emitCodeBody(ResolvedJavaMethod installedCodeOwner, TargetMethodAssembler tasm, LIRGenerator lirGen) { |
8281
8fde1be81b2d
LIRGenerator is transmitted across backend passes instead of just the LIR so that backend-specific, per-compilation information can be attached to the backend-specific LIRGenerator object
Doug Simon <doug.simon@oracle.com>
parents:
8217
diff
changeset
|
286 lirGen.lir.emitCode(tasm); |
12502
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
287 } |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
288 |
12502
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
289 /** |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
290 * @param installedCodeOwner see {@link Backend#emitCode} |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
291 */ |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
292 protected void emitCodeSuffix(ResolvedJavaMethod installedCodeOwner, TargetMethodAssembler tasm, LIRGenerator lirGen, AMD64MacroAssembler asm, FrameMap frameMap) { |
28f56bf7c06a
added support code for Truffle to inject special tail-call code into the prefix of OptimizedCallTarget.call(PackedFrame, Arguments)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
293 HotSpotProviders providers = getProviders(); |
9451
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
294 HotSpotFrameContext frameContext = (HotSpotFrameContext) tasm.frameContext; |
3ccda80d466b
stack overflow check and deopt/exception handler entry points are omitted from compiled stubs
Doug Simon <doug.simon@oracle.com>
parents:
9415
diff
changeset
|
295 if (frameContext != null && !frameContext.isStub) { |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
296 HotSpotForeignCallsProvider foreignCalls = providers.getForeignCalls(); |
8334
488c6d5e3b77
Put exception handler entry back.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
8333
diff
changeset
|
297 tasm.recordMark(Marks.MARK_EXCEPTION_HANDLER_ENTRY); |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
298 AMD64Call.directCall(tasm, asm, foreignCalls.lookupForeignCall(EXCEPTION_HANDLER), null, false, null); |
6462 | 299 tasm.recordMark(Marks.MARK_DEOPT_HANDLER_ENTRY); |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
300 AMD64Call.directCall(tasm, asm, foreignCalls.lookupForeignCall(DEOPT_HANDLER), null, false, null); |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
301 } else { |
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
302 // No need to emit the stubs for entries back into the method since |
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
303 // it has no calls that can cause such "return" entries |
9615
1089d63ef168
removed 'method' parameter from GraalCompiler.compiledMethod() and renamed the latter to 'compileGraph'.
Doug Simon <doug.simon@oracle.com>
parents:
9613
diff
changeset
|
304 assert !frameMap.accessesCallerFrame() : lirGen.getGraph(); |
5251
467de393651a
optimization: frame prologue & epilogue ommitted for methods with no spills, no callee-saved registers, no incoming stack args and no debug info
Doug Simon <doug.simon@oracle.com>
parents:
5242
diff
changeset
|
305 } |
5233
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
306 } |
efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
307 } |