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 final long vmVersionFeatures = getFieldValue("Abstract_VM_Version::_features", Long.class, "uint64_t"); 43 44 // SPARC specific values 45 final int sparcVis3Instructions = getConstant("VM_Version::vis3_instructions_m", Integer.class); 46 final int sparcVis2Instructions = getConstant("VM_Version::vis2_instructions_m", Integer.class); 47 final int sparcVis1Instructions = getConstant("VM_Version::vis1_instructions_m", Integer.class); 48 final int sparcCbcondInstructions = getConstant("VM_Version::cbcond_instructions_m", Integer.class); 49 final int sparcV8Instructions = getConstant("VM_Version::v8_instructions_m", Integer.class); 50 final int sparcHardwareMul32 = getConstant("VM_Version::hardware_mul32_m", Integer.class); 51 final int sparcHardwareDiv32 = getConstant("VM_Version::hardware_div32_m", Integer.class); 52 final int sparcHardwareFsmuld = getConstant("VM_Version::hardware_fsmuld_m", Integer.class); 53 final int sparcHardwarePopc = getConstant("VM_Version::hardware_popc_m", Integer.class); 54 final int sparcV9Instructions = getConstant("VM_Version::v9_instructions_m", Integer.class); 55 final int sparcSun4v = getConstant("VM_Version::sun4v_m", Integer.class); 56 final int sparcBlkInitInstructions = getConstant("VM_Version::blk_init_instructions_m", Integer.class); 57 final int sparcFmafInstructions = getConstant("VM_Version::fmaf_instructions_m", Integer.class); 58 final int sparcSparc64Family = getConstant("VM_Version::sparc64_family_m", Integer.class); 59 final int sparcMFamily = getConstant("VM_Version::M_family_m", Integer.class); 60 final int sparcTFamily = getConstant("VM_Version::T_family_m", Integer.class); 61 final int sparcT1Model = getConstant("VM_Version::T1_model_m", Integer.class); 62 final int sparcSparc5Instructions = getConstant("VM_Version::sparc5_instructions_m", Integer.class); 63 final int sparcAesInstructions = getConstant("VM_Version::aes_instructions_m", Integer.class); 64 final int sparcSha1Instruction = getConstant("VM_Version::sha1_instruction_m", Integer.class); 65 final int sparcSha256Instruction = getConstant("VM_Version::sha256_instruction_m", Integer.class); 66 final int sparcSha512Instruction = getConstant("VM_Version::sha512_instruction_m", Integer.class); 67 68 final boolean useBlockZeroing = getFlag("UseBlockZeroing", Boolean.class); 69 final int blockZeroingLowLimit = getFlag("BlockZeroingLowLimit", Integer.class); 70 }