1 /*
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.hotspot.sparc;
24
25 import jdk.vm.ci.hotspot.HotSpotVMConfigAccess;
26 import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
27
28 /**
29 * Used to access native configuration details.
30 *
31 * All non-static, public fields in this class are so that they can be compiled as constants.
32 */
33 class SPARCHotSpotVMConfig extends HotSpotVMConfigAccess {
34
35 SPARCHotSpotVMConfig(HotSpotVMConfigStore config) {
36 super(config);
37 }
38
39 final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
40
41 // CPU capabilities:
42 //
43 // FIXME: Using a 64-bit value is insufficient to support future capability
44 // sets (including co-processor capabilities such as DAX).
45 final long vmVersionFeatures = getFieldValue("Abstract_VM_Version::_features", Long.class, "uint64_t");
46
47 // SPARC specific values:
48 //
49 // NOTE: Values changed into an enumeration (that do indeed fit within a
50 // 32-bit integer) instead of the exported (64-bit wide) bit-masks.
51 final int sparc_ADI = getConstant("VM_Version::ISA_ADI", Integer.class);
52 final int sparc_AES = getConstant("VM_Version::ISA_AES", Integer.class);
53 final int sparc_BLK_INIT = getConstant("VM_Version::ISA_BLK_INIT", Integer.class);
54 final int sparc_CAMELLIA = getConstant("VM_Version::ISA_CAMELLIA", Integer.class);
55 final int sparc_CBCOND = getConstant("VM_Version::ISA_CBCOND", Integer.class);
56 final int sparc_CRC32C = getConstant("VM_Version::ISA_CRC32C", Integer.class);
57 final int sparc_DES = getConstant("VM_Version::ISA_DES", Integer.class);
58 final int sparc_DICTUNP = getConstant("VM_Version::ISA_DICTUNP", Integer.class);
59 final int sparc_FMAF = getConstant("VM_Version::ISA_FMAF", Integer.class);
60 final int sparc_FPCMPSHL = getConstant("VM_Version::ISA_FPCMPSHL", Integer.class);
61 final int sparc_HPC = getConstant("VM_Version::ISA_HPC", Integer.class);
62 final int sparc_IMA = getConstant("VM_Version::ISA_IMA", Integer.class);
63 final int sparc_KASUMI = getConstant("VM_Version::ISA_KASUMI", Integer.class);
64 final int sparc_MD5 = getConstant("VM_Version::ISA_MD5", Integer.class);
65 final int sparc_MME = getConstant("VM_Version::ISA_MME", Integer.class);
66 final int sparc_MONT = getConstant("VM_Version::ISA_MONT", Integer.class);
80 final int sparc_V9 = getConstant("VM_Version::ISA_V9", Integer.class);
81 final int sparc_VAMASK = getConstant("VM_Version::ISA_VAMASK", Integer.class);
82 final int sparc_VIS1 = getConstant("VM_Version::ISA_VIS1", Integer.class);
83 final int sparc_VIS2 = getConstant("VM_Version::ISA_VIS2", Integer.class);
84 final int sparc_VIS3 = getConstant("VM_Version::ISA_VIS3", Integer.class);
85 final int sparc_VIS3B = getConstant("VM_Version::ISA_VIS3B", Integer.class);
86 final int sparc_VIS3C = getConstant("VM_Version::ISA_VIS3C", Integer.class);
87 final int sparc_XMONT = getConstant("VM_Version::ISA_XMONT", Integer.class);
88 final int sparc_XMPMUL = getConstant("VM_Version::ISA_XMPMUL", Integer.class);
89
90 final int sparc_BLK_ZEROING = getConstant("VM_Version::CPU_BLK_ZEROING", Integer.class);
91 final int sparc_FAST_BIS = getConstant("VM_Version::CPU_FAST_BIS", Integer.class);
92 final int sparc_FAST_CMOVE = getConstant("VM_Version::CPU_FAST_CMOVE", Integer.class);
93 final int sparc_FAST_IDIV = getConstant("VM_Version::CPU_FAST_IDIV", Integer.class);
94 final int sparc_FAST_IND_BR = getConstant("VM_Version::CPU_FAST_IND_BR", Integer.class);
95 final int sparc_FAST_LD = getConstant("VM_Version::CPU_FAST_LD", Integer.class);
96 final int sparc_FAST_RDPC = getConstant("VM_Version::CPU_FAST_RDPC", Integer.class);
97
98 final boolean useBlockZeroing = getFlag("UseBlockZeroing", Boolean.class);
99 final int blockZeroingLowLimit = getFlag("BlockZeroingLowLimit", Integer.class);
100 }
|
1 /*
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.hotspot.sparc;
24
25 import jdk.vm.ci.hotspot.HotSpotVMConfigAccess;
26 import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
27
28 /**
29 * Used to access native configuration details.
30 *
31 * All non-static, public fields in this class are so that they can be compiled as constants.
32 */
33 class SPARCHotSpotVMConfig extends HotSpotVMConfigAccess {
34
35 SPARCHotSpotVMConfig(HotSpotVMConfigStore config) {
36 super(config);
37 }
38
39 final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
40
41 // @formatter:off
42 // CPU capabilities:
43 //
44 // FIXME: Using a 64-bit value is insufficient to support future capability
45 // sets (including co-processor capabilities such as DAX).
46 final long vmVersionFeatures = getFieldValue("Abstract_VM_Version::_features", Long.class, "uint64_t");
47
48 //
49 // SPARC specific values:
50 //
51 // NOTE: Values changed into an enumeration (that do indeed fit within a
52 // 32-bit integer) instead of the exported (64-bit wide) bit-masks.
53 final int sparc_ADI = getConstant("VM_Version::ISA_ADI", Integer.class);
54 final int sparc_AES = getConstant("VM_Version::ISA_AES", Integer.class);
55 final int sparc_BLK_INIT = getConstant("VM_Version::ISA_BLK_INIT", Integer.class);
56 final int sparc_CAMELLIA = getConstant("VM_Version::ISA_CAMELLIA", Integer.class);
57 final int sparc_CBCOND = getConstant("VM_Version::ISA_CBCOND", Integer.class);
58 final int sparc_CRC32C = getConstant("VM_Version::ISA_CRC32C", Integer.class);
59 final int sparc_DES = getConstant("VM_Version::ISA_DES", Integer.class);
60 final int sparc_DICTUNP = getConstant("VM_Version::ISA_DICTUNP", Integer.class);
61 final int sparc_FMAF = getConstant("VM_Version::ISA_FMAF", Integer.class);
62 final int sparc_FPCMPSHL = getConstant("VM_Version::ISA_FPCMPSHL", Integer.class);
63 final int sparc_HPC = getConstant("VM_Version::ISA_HPC", Integer.class);
64 final int sparc_IMA = getConstant("VM_Version::ISA_IMA", Integer.class);
65 final int sparc_KASUMI = getConstant("VM_Version::ISA_KASUMI", Integer.class);
66 final int sparc_MD5 = getConstant("VM_Version::ISA_MD5", Integer.class);
67 final int sparc_MME = getConstant("VM_Version::ISA_MME", Integer.class);
68 final int sparc_MONT = getConstant("VM_Version::ISA_MONT", Integer.class);
82 final int sparc_V9 = getConstant("VM_Version::ISA_V9", Integer.class);
83 final int sparc_VAMASK = getConstant("VM_Version::ISA_VAMASK", Integer.class);
84 final int sparc_VIS1 = getConstant("VM_Version::ISA_VIS1", Integer.class);
85 final int sparc_VIS2 = getConstant("VM_Version::ISA_VIS2", Integer.class);
86 final int sparc_VIS3 = getConstant("VM_Version::ISA_VIS3", Integer.class);
87 final int sparc_VIS3B = getConstant("VM_Version::ISA_VIS3B", Integer.class);
88 final int sparc_VIS3C = getConstant("VM_Version::ISA_VIS3C", Integer.class);
89 final int sparc_XMONT = getConstant("VM_Version::ISA_XMONT", Integer.class);
90 final int sparc_XMPMUL = getConstant("VM_Version::ISA_XMPMUL", Integer.class);
91
92 final int sparc_BLK_ZEROING = getConstant("VM_Version::CPU_BLK_ZEROING", Integer.class);
93 final int sparc_FAST_BIS = getConstant("VM_Version::CPU_FAST_BIS", Integer.class);
94 final int sparc_FAST_CMOVE = getConstant("VM_Version::CPU_FAST_CMOVE", Integer.class);
95 final int sparc_FAST_IDIV = getConstant("VM_Version::CPU_FAST_IDIV", Integer.class);
96 final int sparc_FAST_IND_BR = getConstant("VM_Version::CPU_FAST_IND_BR", Integer.class);
97 final int sparc_FAST_LD = getConstant("VM_Version::CPU_FAST_LD", Integer.class);
98 final int sparc_FAST_RDPC = getConstant("VM_Version::CPU_FAST_RDPC", Integer.class);
99
100 final boolean useBlockZeroing = getFlag("UseBlockZeroing", Boolean.class);
101 final int blockZeroingLowLimit = getFlag("BlockZeroingLowLimit", Integer.class);
102 // @formatter:on
103 }
|