Mercurial > hg > truffle
annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotBackend.java @ 21526:1da7aef31a08
created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 19 May 2015 23:16:07 +0200 |
parents | 15a46a918fc1 |
children | 5324104ac4f3 |
rev | line source |
---|---|
6479
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
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; |
6479
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
25 import static com.oracle.graal.hotspot.stubs.StubUtil.*; |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
26 |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
27 import java.util.*; |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
28 |
12488
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
29 import com.oracle.graal.api.code.*; |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
30 import com.oracle.graal.api.code.stack.*; |
9736
951d5ebf3c49
refactored ForeignCallDescriptor into a top level class and moved it to the api.meta project
Doug Simon <doug.simon@oracle.com>
parents:
9735
diff
changeset
|
31 import com.oracle.graal.api.meta.*; |
15192
644dfe49c0f4
Move packages com.oracle.graal.cfg to com.oracle.graal.compiler.common.cfg.
Josef Eisl <josef.eisl@jku.at>
parents:
15157
diff
changeset
|
32 import com.oracle.graal.compiler.common.cfg.*; |
6479
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
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:
21413
diff
changeset
|
34 import com.oracle.graal.hotspot.jvmci.*; |
6494
df02fa2bce58
refactored all AMD64 specific HotSpot code in com.oracle.graal.hotspot.target.amd64 package
Doug Simon <doug.simon@oracle.com>
parents:
6490
diff
changeset
|
35 import com.oracle.graal.hotspot.meta.*; |
15926
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
36 import com.oracle.graal.hotspot.nodes.*; |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
37 import com.oracle.graal.hotspot.replacements.*; |
9471
5fa54bf57f8c
replaced exception_handler_nofpu assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9458
diff
changeset
|
38 import com.oracle.graal.hotspot.stubs.*; |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
39 import com.oracle.graal.lir.*; |
17284
d21962ea9617
Remove ValueConsumer.visitValue(Value).
Josef Eisl <josef.eisl@jku.at>
parents:
16805
diff
changeset
|
40 import com.oracle.graal.lir.LIRInstruction.OperandFlag; |
d21962ea9617
Remove ValueConsumer.visitValue(Value).
Josef Eisl <josef.eisl@jku.at>
parents:
16805
diff
changeset
|
41 import com.oracle.graal.lir.LIRInstruction.OperandMode; |
14524
10c4df6767c4
removed GPU offload interaction with compilation policy
Doug Simon <doug.simon@oracle.com>
parents:
13637
diff
changeset
|
42 import com.oracle.graal.lir.StandardOp.LabelOp; |
10c4df6767c4
removed GPU offload interaction with compilation policy
Doug Simon <doug.simon@oracle.com>
parents:
13637
diff
changeset
|
43 import com.oracle.graal.lir.StandardOp.SaveRegistersOp; |
20003
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
44 import com.oracle.graal.lir.asm.*; |
18443
1c92d437179b
FrameMapBuilder: move into package.
Josef Eisl <josef.eisl@jku.at>
parents:
18140
diff
changeset
|
45 import com.oracle.graal.lir.framemap.*; |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
46 import com.oracle.graal.nodes.*; |
19462
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
47 import com.oracle.graal.options.*; |
12488
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
48 import com.oracle.graal.phases.tiers.*; |
9471
5fa54bf57f8c
replaced exception_handler_nofpu assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9458
diff
changeset
|
49 import com.oracle.graal.word.*; |
6479
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
50 |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
51 /** |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
52 * HotSpot specific backend. |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
53 */ |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
54 public abstract class HotSpotBackend extends Backend { |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
55 |
19462
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
56 public static class Options { |
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
57 // @formatter:off |
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
58 @Option(help = "Use Graal stubs instead of HotSpot stubs where possible") |
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
59 public static final OptionValue<Boolean> PreferGraalStubs = new OptionValue<>(false); |
20003
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
60 @Option(help = "Enables instruction profiling on assembler level. Valid values are a comma separated list of supported instructions." + |
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
61 " Compare with subclasses of Assembler.InstructionCounter.", type = OptionType.Debug) |
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
62 public static final OptionValue<String> ASMInstructionProfiling = new OptionValue<>(null); |
19462
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
63 // @formatter:on |
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
64 } |
33a783b15758
made use of Graal stubs instead of equivalent HotSpot stubs optional and off by default
Doug Simon <doug.simon@oracle.com>
parents:
18525
diff
changeset
|
65 |
9458
75eb896f053a
documented the descriptors for certain HotSpot runtime stubs
Doug Simon <doug.simon@oracle.com>
parents:
9456
diff
changeset
|
66 /** |
9471
5fa54bf57f8c
replaced exception_handler_nofpu assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9458
diff
changeset
|
67 * Descriptor for {@link ExceptionHandlerStub}. This stub is called by the |
21413
15a46a918fc1
removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20003
diff
changeset
|
68 * {@linkplain HotSpotVMConfig#MARKID_EXCEPTION_HANDLER_ENTRY exception handler} in a compiled |
15a46a918fc1
removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20003
diff
changeset
|
69 * method. |
9458
75eb896f053a
documented the descriptors for certain HotSpot runtime stubs
Doug Simon <doug.simon@oracle.com>
parents:
9456
diff
changeset
|
70 */ |
9737
34c892fdfb6d
moved responsibility for determining if a foreign call has a side effect to the runtime
Doug Simon <doug.simon@oracle.com>
parents:
9736
diff
changeset
|
71 public static final ForeignCallDescriptor EXCEPTION_HANDLER = new ForeignCallDescriptor("exceptionHandler", void.class, Object.class, Word.class); |
9458
75eb896f053a
documented the descriptors for certain HotSpot runtime stubs
Doug Simon <doug.simon@oracle.com>
parents:
9456
diff
changeset
|
72 |
75eb896f053a
documented the descriptors for certain HotSpot runtime stubs
Doug Simon <doug.simon@oracle.com>
parents:
9456
diff
changeset
|
73 /** |
75eb896f053a
documented the descriptors for certain HotSpot runtime stubs
Doug Simon <doug.simon@oracle.com>
parents:
9456
diff
changeset
|
74 * Descriptor for SharedRuntime::get_ic_miss_stub(). |
75eb896f053a
documented the descriptors for certain HotSpot runtime stubs
Doug Simon <doug.simon@oracle.com>
parents:
9456
diff
changeset
|
75 */ |
9737
34c892fdfb6d
moved responsibility for determining if a foreign call has a side effect to the runtime
Doug Simon <doug.simon@oracle.com>
parents:
9736
diff
changeset
|
76 public static final ForeignCallDescriptor IC_MISS_HANDLER = new ForeignCallDescriptor("icMissHandler", void.class); |
9455
62af2ee39bc5
moved initialization of UNCOMMON_TRAP descriptor from AMD64 code to platform independent code
Doug Simon <doug.simon@oracle.com>
parents:
6521
diff
changeset
|
77 |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
78 /** |
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
79 * Descriptor for {@link UnwindExceptionToCallerStub}. This stub is called by code generated |
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
80 * from {@link UnwindNode}. |
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
81 */ |
9737
34c892fdfb6d
moved responsibility for determining if a foreign call has a side effect to the runtime
Doug Simon <doug.simon@oracle.com>
parents:
9736
diff
changeset
|
82 public static final ForeignCallDescriptor UNWIND_EXCEPTION_TO_CALLER = new ForeignCallDescriptor("unwindExceptionToCaller", void.class, Object.class, Word.class); |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
83 |
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
84 /** |
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
85 * Descriptor for the arguments when unwinding to an exception handler in a caller. |
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
86 */ |
9737
34c892fdfb6d
moved responsibility for determining if a foreign call has a side effect to the runtime
Doug Simon <doug.simon@oracle.com>
parents:
9736
diff
changeset
|
87 public static final ForeignCallDescriptor EXCEPTION_HANDLER_IN_CALLER = new ForeignCallDescriptor("exceptionHandlerInCaller", void.class, Object.class, Word.class); |
9562
99ef9bcb3f32
replaced unwind_exception_call assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9471
diff
changeset
|
88 |
18525
c538c2c6b7e2
changed most references to HotSpotGraalRuntime to use HotSpotGraalRuntimeProvider instead
Doug Simon <doug.simon@oracle.com>
parents:
18443
diff
changeset
|
89 private final HotSpotGraalRuntimeProvider runtime; |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
90 |
15926
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
91 /** |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
92 * @see DeoptimizationFetchUnrollInfoCallNode |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
93 */ |
15971
ef43e8c355ad
fixed declaration of fetchUnrollInfo foreign call descriptor
Doug Simon <doug.simon@oracle.com>
parents:
15968
diff
changeset
|
94 public static final ForeignCallDescriptor FETCH_UNROLL_INFO = new ForeignCallDescriptor("fetchUnrollInfo", Word.class, long.class); |
15968
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
95 |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
96 /** |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
97 * @see DeoptimizationStub#unpackFrames(ForeignCallDescriptor, Word, int) |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
98 */ |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
99 public static final ForeignCallDescriptor UNPACK_FRAMES = newDescriptor(DeoptimizationStub.class, "unpackFrames", int.class, Word.class, int.class); |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
100 |
42eaa579e134
more improvements to runtime initialization:
Doug Simon <doug.simon@oracle.com>
parents:
15926
diff
changeset
|
101 /** |
15926
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
102 * @see AESCryptSubstitutions#encryptBlockStub(ForeignCallDescriptor, Word, Word, Word) |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
103 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
104 public static final ForeignCallDescriptor ENCRYPT_BLOCK = new ForeignCallDescriptor("encrypt_block", void.class, Word.class, Word.class, Word.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
105 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
106 /** |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
107 * @see AESCryptSubstitutions#decryptBlockStub(ForeignCallDescriptor, Word, Word, Word) |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
108 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
109 public static final ForeignCallDescriptor DECRYPT_BLOCK = new ForeignCallDescriptor("decrypt_block", void.class, Word.class, Word.class, Word.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
110 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
111 /** |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
112 * @see CipherBlockChainingSubstitutions#crypt |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
113 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
114 public static final ForeignCallDescriptor ENCRYPT = new ForeignCallDescriptor("encrypt", void.class, Word.class, Word.class, Word.class, Word.class, int.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
115 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
116 /** |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
117 * @see CipherBlockChainingSubstitutions#crypt |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
118 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
119 public static final ForeignCallDescriptor DECRYPT = new ForeignCallDescriptor("decrypt", void.class, Word.class, Word.class, Word.class, Word.class, int.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
120 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
121 /** |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
122 * @see VMErrorNode |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
123 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
124 public static final ForeignCallDescriptor VM_ERROR = new ForeignCallDescriptor("vm_error", void.class, Object.class, Object.class, long.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
125 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
126 /** |
19856
63b6ad88b08f
Consolidation of new allocation stubs to use the standard ForeignCallNode.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19560
diff
changeset
|
127 * New multi array stub call. |
15926
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
128 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
129 public static final ForeignCallDescriptor NEW_MULTI_ARRAY = new ForeignCallDescriptor("new_multi_array", Object.class, Word.class, int.class, Word.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
130 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
131 /** |
19857
82f65fca8da6
Fix javadoc.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19856
diff
changeset
|
132 * New array stub. |
15926
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
133 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
134 public static final ForeignCallDescriptor NEW_ARRAY = new ForeignCallDescriptor("new_array", Object.class, Word.class, int.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
135 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
136 /** |
19857
82f65fca8da6
Fix javadoc.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19856
diff
changeset
|
137 * New insstance stub. |
15926
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
138 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
139 public static final ForeignCallDescriptor NEW_INSTANCE = new ForeignCallDescriptor("new_instance", Object.class, Word.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
140 |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
141 /** |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
142 * @see UncommonTrapCallNode |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
143 */ |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
144 public static final ForeignCallDescriptor UNCOMMON_TRAP = new ForeignCallDescriptor("uncommonTrap", Word.class, Word.class, int.class); |
af0e42dad358
reduced time to initialize ForeignCallProviders by avoiding triggering class initialization of Node subclasses as well as making annotation parsing lazy in SnippetInfo
Doug Simon <doug.simon@oracle.com>
parents:
15456
diff
changeset
|
145 |
18525
c538c2c6b7e2
changed most references to HotSpotGraalRuntime to use HotSpotGraalRuntimeProvider instead
Doug Simon <doug.simon@oracle.com>
parents:
18443
diff
changeset
|
146 public HotSpotBackend(HotSpotGraalRuntimeProvider runtime, HotSpotProviders providers) { |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
147 super(providers); |
12431
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
12429
diff
changeset
|
148 this.runtime = runtime; |
6479
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
149 } |
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
150 |
18525
c538c2c6b7e2
changed most references to HotSpotGraalRuntime to use HotSpotGraalRuntimeProvider instead
Doug Simon <doug.simon@oracle.com>
parents:
18443
diff
changeset
|
151 public HotSpotGraalRuntimeProvider getRuntime() { |
12431
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
12429
diff
changeset
|
152 return runtime; |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
153 } |
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
154 |
12580
7876c59a7a2f
refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents:
12488
diff
changeset
|
155 /** |
7876c59a7a2f
refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents:
12488
diff
changeset
|
156 * Performs any remaining initialization that was deferred until the {@linkplain #getRuntime() |
7876c59a7a2f
refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents:
12488
diff
changeset
|
157 * runtime} object was initialized and this backend was registered with it. |
7876c59a7a2f
refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents:
12488
diff
changeset
|
158 */ |
7876c59a7a2f
refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents:
12488
diff
changeset
|
159 public void completeInitialization() { |
7876c59a7a2f
refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents:
12488
diff
changeset
|
160 } |
7876c59a7a2f
refactored all deferred initialization of backends into HotSpotBackend
Doug Simon <doug.simon@oracle.com>
parents:
12488
diff
changeset
|
161 |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
162 /** |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
163 * Finds all the registers that are defined by some given LIR. |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
164 * |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
165 * @param lir the LIR to examine |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
166 * @return the registers that are defined by or used as temps for any instruction in {@code lir} |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
167 */ |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
168 protected static Set<Register> gatherDefinedRegisters(LIR lir) { |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
169 final Set<Register> definedRegisters = new HashSet<>(); |
16805
3df013ee6c96
Use ValueConsumer in HotSpotBackend.
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
170 ValueConsumer defConsumer = new ValueConsumer() { |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
171 |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
172 @Override |
17284
d21962ea9617
Remove ValueConsumer.visitValue(Value).
Josef Eisl <josef.eisl@jku.at>
parents:
16805
diff
changeset
|
173 public void visitValue(Value value, OperandMode mode, EnumSet<OperandFlag> flags) { |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
174 if (ValueUtil.isRegister(value)) { |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
175 final Register reg = ValueUtil.asRegister(value); |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
176 definedRegisters.add(reg); |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
177 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
178 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
179 }; |
19560
4d70d150944f
Remove AbstractBlock interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19462
diff
changeset
|
180 for (AbstractBlockBase<?> block : lir.codeEmittingOrder()) { |
14806
a8723f1ff542
LIR renamed setter and getter functions.
Josef Eisl <josef.eisl@jku.at>
parents:
14803
diff
changeset
|
181 for (LIRInstruction op : lir.getLIRforBlock(block)) { |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
182 if (op instanceof LabelOp) { |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
183 // Don't consider this as a definition |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
184 } else { |
16805
3df013ee6c96
Use ValueConsumer in HotSpotBackend.
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
185 op.visitEachTemp(defConsumer); |
3df013ee6c96
Use ValueConsumer in HotSpotBackend.
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
186 op.visitEachOutput(defConsumer); |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
187 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
188 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
189 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
190 return definedRegisters; |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
191 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
192 |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
193 /** |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
194 * Updates a given stub with respect to the registers it destroys. |
12621
7f55cdeec6af
improved documentation of HotSpotBackend.updateStub()
Doug Simon <doug.simon@oracle.com>
parents:
12613
diff
changeset
|
195 * <p> |
7f55cdeec6af
improved documentation of HotSpotBackend.updateStub()
Doug Simon <doug.simon@oracle.com>
parents:
12613
diff
changeset
|
196 * Any entry in {@code calleeSaveInfo} that {@linkplain SaveRegistersOp#supportsRemove() |
7f55cdeec6af
improved documentation of HotSpotBackend.updateStub()
Doug Simon <doug.simon@oracle.com>
parents:
12613
diff
changeset
|
197 * supports} pruning will have {@code destroyedRegisters} |
7f55cdeec6af
improved documentation of HotSpotBackend.updateStub()
Doug Simon <doug.simon@oracle.com>
parents:
12613
diff
changeset
|
198 * {@linkplain SaveRegistersOp#remove(Set) removed} as these registers are declared as |
7f55cdeec6af
improved documentation of HotSpotBackend.updateStub()
Doug Simon <doug.simon@oracle.com>
parents:
12613
diff
changeset
|
199 * temporaries in the stub's {@linkplain ForeignCallLinkage linkage} (and thus will be saved by |
7f55cdeec6af
improved documentation of HotSpotBackend.updateStub()
Doug Simon <doug.simon@oracle.com>
parents:
12613
diff
changeset
|
200 * the stub's caller). |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
201 * |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
202 * @param stub the stub to update |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
203 * @param destroyedRegisters the registers destroyed by the stub |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
204 * @param calleeSaveInfo a map from debug infos to the operations that provide their |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
205 * {@linkplain RegisterSaveLayout callee-save information} |
18140
185bd9096c88
Remove FrameMap.indexForStackSlot().
Josef Eisl <josef.eisl@jku.at>
parents:
17284
diff
changeset
|
206 * @param frameMap used to {@linkplain FrameMap#offsetForStackSlot(StackSlot) convert} a virtual |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
207 * slot to a frame slot index |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
208 */ |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
209 protected void updateStub(Stub stub, Set<Register> destroyedRegisters, Map<LIRFrameState, SaveRegistersOp> calleeSaveInfo, FrameMap frameMap) { |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
210 stub.initDestroyedRegisters(destroyedRegisters); |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
211 |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
212 for (Map.Entry<LIRFrameState, SaveRegistersOp> e : calleeSaveInfo.entrySet()) { |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
213 SaveRegistersOp save = e.getValue(); |
12613
595f01abb887
clearer API and documentation for the capability of a SaveRegistersOp to have its registers pruned
Doug Simon <doug.simon@oracle.com>
parents:
12610
diff
changeset
|
214 if (save.supportsRemove()) { |
595f01abb887
clearer API and documentation for the capability of a SaveRegistersOp to have its registers pruned
Doug Simon <doug.simon@oracle.com>
parents:
12610
diff
changeset
|
215 save.remove(destroyedRegisters); |
595f01abb887
clearer API and documentation for the capability of a SaveRegistersOp to have its registers pruned
Doug Simon <doug.simon@oracle.com>
parents:
12610
diff
changeset
|
216 } |
12610
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
217 DebugInfo info = e.getKey() == null ? null : e.getKey().debugInfo(); |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
218 if (info != null) { |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
219 info.setCalleeSaveInfo(save.getMap(frameMap)); |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
220 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
221 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
222 } |
62fb4919edc9
cleaned up mechanism for saving registers and updating the callee save maps in stubs
Doug Simon <doug.simon@oracle.com>
parents:
12580
diff
changeset
|
223 |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
224 @Override |
15063
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
225 public StackIntrospection getStackIntrospection() { |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
226 return runtime; |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
227 } |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
228 |
36e1a11a72b3
new StackIntrospection interface to allow access to stack contents
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14906
diff
changeset
|
229 @Override |
12429
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
230 public HotSpotProviders getProviders() { |
5124eeec1a7b
split HotSpotRuntime into separate provider implementations
Doug Simon <doug.simon@oracle.com>
parents:
12363
diff
changeset
|
231 return (HotSpotProviders) super.getProviders(); |
6494
df02fa2bce58
refactored all AMD64 specific HotSpot code in com.oracle.graal.hotspot.target.amd64 package
Doug Simon <doug.simon@oracle.com>
parents:
6490
diff
changeset
|
232 } |
12488
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
233 |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
234 @Override |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
235 public SuitesProvider getSuites() { |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
236 return getProviders().getSuites(); |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
237 } |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
238 |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
239 @Override |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
240 public DisassemblerProvider getDisassembler() { |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
241 return getProviders().getDisassembler(); |
1a4dc163cd0a
abstracted HotSpotGraalRuntime as a RuntimeProvider which removes the recent selector addition to the Graal capabilities API and also makes Truffle independent of the graal.hotspot project (GRAAL-363)
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
242 } |
20003
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
243 |
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
244 protected void profileInstructions(LIR lir, CompilationResultBuilder crb) { |
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
245 if (HotSpotBackend.Options.ASMInstructionProfiling.getValue() != null) { |
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
246 HotSpotInstructionProfiling.countInstructions(lir, crb.asm); |
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
247 } |
422e60a2f4b9
Implement dynamic instruction counters on assembly level
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
19857
diff
changeset
|
248 } |
6479
e8be2bb3760e
introduced platform independent HotSpotBackend to manage stub linkage information
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
249 } |