Path: blob/master/runtime/compiler/arm/env/J9CPU.cpp
6004 views
/*******************************************************************************1* Copyright (c) 2018, 2020 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#include "env/CompilerEnv.hpp"23#include "env/CPU.hpp"2425bool26J9::ARM::CPU::isCompatible(const OMRProcessorDesc& processorDescription)27{28return self()->getProcessorDescription().processor == processorDescription.processor;29}3031OMRProcessorDesc32J9::ARM::CPU::getProcessorDescription()33{34static bool initialized = false;35if (!initialized)36{37memset(_processorDescription.features, 0, OMRPORT_SYSINFO_FEATURES_SIZE*sizeof(uint32_t));38switch (self()->id())39{40case TR_DefaultARMProcessor:41_processorDescription.processor = OMR_PROCESSOR_ARM_UNKNOWN;42break;43case TR_ARMv6:44_processorDescription.processor = OMR_PROCESSOR_ARM_V6;45break;46case TR_ARMv7:47_processorDescription.processor = OMR_PROCESSOR_ARM_V7;48break;49default:50TR_ASSERT_FATAL(false, "Invalid ARM64 Processor ID");51}52_processorDescription.physicalProcessor = _processorDescription.processor;53initialized = true;54}55return _processorDescription;56}5758596061