Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java @ 23393:1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 12 May 2016 20:57:31 +0200 |
parents | f2206f5bb62e |
children | 9ed5b586018b |
rev | line source |
---|---|
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 */ |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
23 package jdk.vm.ci.hotspot.sparc; |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
23393
1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
Doug Simon <doug.simon@oracle.com>
parents:
22761
diff
changeset
|
25 import static jdk.vm.ci.common.InitTimer.timer; |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
26 |
22569
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22509
diff
changeset
|
27 import java.util.EnumSet; |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
28 |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
29 import jdk.vm.ci.code.Architecture; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
30 import jdk.vm.ci.code.RegisterConfig; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
31 import jdk.vm.ci.code.TargetDescription; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
32 import jdk.vm.ci.code.stack.StackIntrospection; |
23393
1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
Doug Simon <doug.simon@oracle.com>
parents:
22761
diff
changeset
|
33 import jdk.vm.ci.common.InitTimer; |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
34 import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
35 import jdk.vm.ci.hotspot.HotSpotConstantReflectionProvider; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
36 import jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
37 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
38 import jdk.vm.ci.hotspot.HotSpotMetaAccessProvider; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
39 import jdk.vm.ci.hotspot.HotSpotStackIntrospection; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
40 import jdk.vm.ci.hotspot.HotSpotVMConfig; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
41 import jdk.vm.ci.runtime.JVMCIBackend; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
42 import jdk.vm.ci.sparc.SPARC; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
43 import jdk.vm.ci.sparc.SPARC.CPUFeature; |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
44 |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
45 public class SPARCHotSpotJVMCIBackendFactory implements HotSpotJVMCIBackendFactory { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
46 |
22613
9409f7cec59a
Remove dependency from HotSpotJVMCIRuntime to CompilerFactory.
Roland Schatz <roland.schatz@oracle.com>
parents:
22569
diff
changeset
|
47 protected TargetDescription createTarget(HotSpotVMConfig config) { |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
48 final int stackFrameAlignment = 16; |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
49 final int implicitNullCheckLimit = 4096; |
22114
d9f3acb4a9a1
[SPARC] Implement constant loads from constant table with base register
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22054
diff
changeset
|
50 final boolean inlineObjects = false; |
22429
a1b0a76567c7
Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
22424
diff
changeset
|
51 Architecture arch = new SPARC(computeFeatures(config)); |
22613
9409f7cec59a
Remove dependency from HotSpotJVMCIRuntime to CompilerFactory.
Roland Schatz <roland.schatz@oracle.com>
parents:
22569
diff
changeset
|
52 return new TargetDescription(arch, true, stackFrameAlignment, implicitNullCheckLimit, inlineObjects); |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
53 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
54 |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
55 protected HotSpotCodeCacheProvider createCodeCache(HotSpotJVMCIRuntimeProvider runtime, TargetDescription target, RegisterConfig regConfig) { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
56 return new HotSpotCodeCacheProvider(runtime, runtime.getConfig(), target, regConfig); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
57 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
58 |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
59 protected EnumSet<CPUFeature> computeFeatures(HotSpotVMConfig config) { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
60 EnumSet<CPUFeature> features = EnumSet.noneOf(CPUFeature.class); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
61 if ((config.sparcFeatures & config.vis1Instructions) != 0) { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
62 features.add(CPUFeature.VIS1); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
63 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
64 if ((config.sparcFeatures & config.vis2Instructions) != 0) { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
65 features.add(CPUFeature.VIS2); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
66 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
67 if ((config.sparcFeatures & config.vis3Instructions) != 0) { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
68 features.add(CPUFeature.VIS3); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
69 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
70 if ((config.sparcFeatures & config.cbcondInstructions) != 0) { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
71 features.add(CPUFeature.CBCOND); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
72 } |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
73 if ((config.sparcFeatures & config.v8Instructions) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
74 features.add(CPUFeature.V8); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
75 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
76 if ((config.sparcFeatures & config.hardwareMul32) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
77 features.add(CPUFeature.HARDWARE_MUL32); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
78 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
79 if ((config.sparcFeatures & config.hardwareDiv32) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
80 features.add(CPUFeature.HARDWARE_DIV32); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
81 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
82 if ((config.sparcFeatures & config.hardwareFsmuld) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
83 features.add(CPUFeature.HARDWARE_FSMULD); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
84 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
85 if ((config.sparcFeatures & config.hardwarePopc) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
86 features.add(CPUFeature.HARDWARE_POPC); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
87 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
88 if ((config.sparcFeatures & config.v9Instructions) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
89 features.add(CPUFeature.V9); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
90 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
91 if ((config.sparcFeatures & config.sun4v) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
92 features.add(CPUFeature.SUN4V); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
93 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
94 if ((config.sparcFeatures & config.blkInitInstructions) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
95 features.add(CPUFeature.BLK_INIT_INSTRUCTIONS); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
96 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
97 if ((config.sparcFeatures & config.fmafInstructions) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
98 features.add(CPUFeature.FMAF); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
99 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
100 if ((config.sparcFeatures & config.fmauInstructions) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
101 features.add(CPUFeature.FMAU); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
102 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
103 if ((config.sparcFeatures & config.sparc64Family) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
104 features.add(CPUFeature.SPARC64_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
105 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
106 if ((config.sparcFeatures & config.mFamily) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
107 features.add(CPUFeature.M_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
108 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
109 if ((config.sparcFeatures & config.tFamily) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
110 features.add(CPUFeature.T_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
111 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
112 if ((config.sparcFeatures & config.t1Model) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
113 features.add(CPUFeature.T1_MODEL); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
114 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
115 if ((config.sparcFeatures & config.sparc5Instructions) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
116 features.add(CPUFeature.SPARC5); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
117 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
118 if ((config.sparcFeatures & config.aesInstructions) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
119 features.add(CPUFeature.SPARC64_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
120 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
121 if ((config.sparcFeatures & config.sha1Instruction) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
122 features.add(CPUFeature.SHA1); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
123 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
124 if ((config.sparcFeatures & config.sha256Instruction) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
125 features.add(CPUFeature.SHA256); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
126 } |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
127 if ((config.sparcFeatures & config.sha512Instruction) != 0) { |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
128 features.add(CPUFeature.SHA512); |
22424
cefff7d980bc
[SPARC] Add vmflags for BlockZeroing
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22398
diff
changeset
|
129 } |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
130 return features; |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
131 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
132 |
22429
a1b0a76567c7
Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
22424
diff
changeset
|
133 @Override |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
134 public String getArchitecture() { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
135 return "SPARC"; |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
136 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
137 |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
138 @Override |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
139 public String toString() { |
22429
a1b0a76567c7
Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
22424
diff
changeset
|
140 return "JVMCIBackend:" + getArchitecture(); |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
141 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
142 |
22509
267eecd6d92a
suppressed -Xlint:try warnings
Doug Simon <doug.simon@oracle.com>
parents:
22429
diff
changeset
|
143 @SuppressWarnings("try") |
22613
9409f7cec59a
Remove dependency from HotSpotJVMCIRuntime to CompilerFactory.
Roland Schatz <roland.schatz@oracle.com>
parents:
22569
diff
changeset
|
144 public JVMCIBackend createJVMCIBackend(HotSpotJVMCIRuntimeProvider runtime, JVMCIBackend host) { |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
145 assert host == null; |
22613
9409f7cec59a
Remove dependency from HotSpotJVMCIRuntime to CompilerFactory.
Roland Schatz <roland.schatz@oracle.com>
parents:
22569
diff
changeset
|
146 TargetDescription target = createTarget(runtime.getConfig()); |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
147 |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
148 HotSpotMetaAccessProvider metaAccess = new HotSpotMetaAccessProvider(runtime); |
22681
c278790fa252
[SPARC] Move allocatable register selection out of the Architecture description
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22672
diff
changeset
|
149 RegisterConfig regConfig = new SPARCHotSpotRegisterConfig(target.arch, runtime.getConfig()); |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
150 HotSpotCodeCacheProvider codeCache = createCodeCache(runtime, target, regConfig); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
151 HotSpotConstantReflectionProvider constantReflection = new HotSpotConstantReflectionProvider(runtime); |
22635
353eb2b44df8
added HotSpotStackIntrospection and made CompilerToVM.getNextStackFrame package-private
Doug Simon <doug.simon@oracle.com>
parents:
22613
diff
changeset
|
152 StackIntrospection stackIntrospection = new HotSpotStackIntrospection(runtime); |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
153 try (InitTimer rt = timer("instantiate backend")) { |
22635
353eb2b44df8
added HotSpotStackIntrospection and made CompilerToVM.getNextStackFrame package-private
Doug Simon <doug.simon@oracle.com>
parents:
22613
diff
changeset
|
154 return createBackend(metaAccess, codeCache, constantReflection, stackIntrospection); |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
155 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
156 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
157 |
22635
353eb2b44df8
added HotSpotStackIntrospection and made CompilerToVM.getNextStackFrame package-private
Doug Simon <doug.simon@oracle.com>
parents:
22613
diff
changeset
|
158 protected JVMCIBackend createBackend(HotSpotMetaAccessProvider metaAccess, HotSpotCodeCacheProvider codeCache, HotSpotConstantReflectionProvider constantReflection, |
353eb2b44df8
added HotSpotStackIntrospection and made CompilerToVM.getNextStackFrame package-private
Doug Simon <doug.simon@oracle.com>
parents:
22613
diff
changeset
|
159 StackIntrospection stackIntrospection) { |
353eb2b44df8
added HotSpotStackIntrospection and made CompilerToVM.getNextStackFrame package-private
Doug Simon <doug.simon@oracle.com>
parents:
22613
diff
changeset
|
160 return new JVMCIBackend(metaAccess, codeCache, constantReflection, stackIntrospection); |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
161 } |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
162 } |