Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java @ 23693:0d09e13523b4 jvmci-0.14
SPARCHotSpotRegisterConfig.callingConvention gives incorrect calling convention for native calls containing fp args (JDK-8159368)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 16 Jun 2016 18:39:34 +0200 |
parents | 71becd3e2b1f |
children |
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 /* |
23396
9ed5b586018b
Replace LIRKind with abstract base class (JDK-8156942).
Roland Schatz <roland.schatz@oracle.com>
parents:
23393
diff
changeset
|
2 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. |
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
|
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.runtime.JVMCIBackend; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22635
diff
changeset
|
41 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
|
42 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
|
43 |
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 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
|
45 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
46 protected TargetDescription createTarget(SPARCHotSpotVMConfig 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
|
47 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
|
48 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
|
49 final boolean inlineObjects = false; |
22429
a1b0a76567c7
Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
22424
diff
changeset
|
50 Architecture arch = new SPARC(computeFeatures(config)); |
22613
9409f7cec59a
Remove dependency from HotSpotJVMCIRuntime to CompilerFactory.
Roland Schatz <roland.schatz@oracle.com>
parents:
22569
diff
changeset
|
51 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
|
52 } |
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 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
|
55 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
|
56 } |
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 |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
58 protected EnumSet<CPUFeature> computeFeatures(SPARCHotSpotVMConfig 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
|
59 EnumSet<CPUFeature> features = EnumSet.noneOf(CPUFeature.class); |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
60 if ((config.vmVersionFeatures & config.sparcVis1Instructions) != 0) { |
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
|
61 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
|
62 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
63 if ((config.vmVersionFeatures & config.sparcVis2Instructions) != 0) { |
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
|
64 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
|
65 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
66 if ((config.vmVersionFeatures & config.sparcVis3Instructions) != 0) { |
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
|
67 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
|
68 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
69 if ((config.vmVersionFeatures & config.sparcCbcondInstructions) != 0) { |
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
|
70 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
|
71 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
72 if ((config.vmVersionFeatures & config.sparcV8Instructions) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
73 features.add(CPUFeature.V8); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
74 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
75 if ((config.vmVersionFeatures & config.sparcHardwareMul32) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
76 features.add(CPUFeature.HARDWARE_MUL32); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
77 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
78 if ((config.vmVersionFeatures & config.sparcHardwareDiv32) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
79 features.add(CPUFeature.HARDWARE_DIV32); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
80 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
81 if ((config.vmVersionFeatures & config.sparcHardwareFsmuld) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
82 features.add(CPUFeature.HARDWARE_FSMULD); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
83 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
84 if ((config.vmVersionFeatures & config.sparcHardwarePopc) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
85 features.add(CPUFeature.HARDWARE_POPC); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
86 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
87 if ((config.vmVersionFeatures & config.sparcV9Instructions) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
88 features.add(CPUFeature.V9); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
89 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
90 if ((config.vmVersionFeatures & config.sparcSun4v) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
91 features.add(CPUFeature.SUN4V); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
92 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
93 if ((config.vmVersionFeatures & config.sparcBlkInitInstructions) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
94 features.add(CPUFeature.BLK_INIT_INSTRUCTIONS); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
95 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
96 if ((config.vmVersionFeatures & config.sparcFmafInstructions) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
97 features.add(CPUFeature.FMAF); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
98 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
99 if ((config.vmVersionFeatures & config.sparcFmauInstructions) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
100 features.add(CPUFeature.FMAU); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
101 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
102 if ((config.vmVersionFeatures & config.sparcSparc64Family) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
103 features.add(CPUFeature.SPARC64_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
104 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
105 if ((config.vmVersionFeatures & config.sparcMFamily) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
106 features.add(CPUFeature.M_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
107 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
108 if ((config.vmVersionFeatures & config.sparcTFamily) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
109 features.add(CPUFeature.T_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
110 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
111 if ((config.vmVersionFeatures & config.sparcT1Model) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
112 features.add(CPUFeature.T1_MODEL); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
113 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
114 if ((config.vmVersionFeatures & config.sparcSparc5Instructions) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
115 features.add(CPUFeature.SPARC5); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
116 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
117 if ((config.vmVersionFeatures & config.sparcAesInstructions) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
118 features.add(CPUFeature.SPARC64_FAMILY); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
119 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
120 if ((config.vmVersionFeatures & config.sparcSha1Instruction) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
121 features.add(CPUFeature.SHA1); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
122 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
123 if ((config.vmVersionFeatures & config.sparcSha256Instruction) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
124 features.add(CPUFeature.SHA256); |
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
125 } |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
126 if ((config.vmVersionFeatures & config.sparcSha512Instruction) != 0) { |
22683
2935e7fbd941
Provide all HotSpot Feature_Flags in JVMCI
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22681
diff
changeset
|
127 features.add(CPUFeature.SHA512); |
22424
cefff7d980bc
[SPARC] Add vmflags for BlockZeroing
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
22398
diff
changeset
|
128 } |
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
|
129 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
|
130 } |
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 |
22429
a1b0a76567c7
Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
22424
diff
changeset
|
132 @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
|
133 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
|
134 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
|
135 } |
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 @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
|
138 public String toString() { |
22429
a1b0a76567c7
Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
22424
diff
changeset
|
139 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
|
140 } |
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 |
22509
267eecd6d92a
suppressed -Xlint:try warnings
Doug Simon <doug.simon@oracle.com>
parents:
22429
diff
changeset
|
142 @SuppressWarnings("try") |
22613
9409f7cec59a
Remove dependency from HotSpotJVMCIRuntime to CompilerFactory.
Roland Schatz <roland.schatz@oracle.com>
parents:
22569
diff
changeset
|
143 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
|
144 assert host == null; |
23679
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
145 SPARCHotSpotVMConfig config = new SPARCHotSpotVMConfig(runtime.getConfigStore()); |
b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
Doug Simon <doug.simon@oracle.com>
parents:
23396
diff
changeset
|
146 TargetDescription target = createTarget(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
|
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); |
23685
71becd3e2b1f
Removed unnecessary parameter from SPARCHotSpotRegisterConfig constructor
Doug Simon <doug.simon@oracle.com>
parents:
23679
diff
changeset
|
149 RegisterConfig regConfig = new SPARCHotSpotRegisterConfig(target, config.useCompressedOops); |
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 } |