Skip to content

Commit

Permalink
RISC-V: add processor enum values
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Vrany <jan.vrany@fit.cvut.cz>
  • Loading branch information
janvrany committed Dec 4, 2020
1 parent 2327ba5 commit a24d33e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
16 changes: 13 additions & 3 deletions compiler/env/Processors.hpp
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -50,11 +50,16 @@ enum Processor
#include "x/env/X86ProcessorEnum.hpp"
LastX86ProcessorMark,

FirstRISCVProcessorMark,
#include "riscv/env/RVProcessorEnum.hpp"
LastRISCVProcessorMark,

NumARMProcessors = LastARMProcessorMark-FirstARMProcessorMark-1,
NumARM64Processors = LastARM64ProcessorMark-FirstARM64ProcessorMark-1,
NumPowerProcessors = LastPowerProcessorMark-FirstPowerProcessorMark-1,
NumZProcessors = LastZProcessorMark-FirstZProcessorMark-1,
NumX86Processors = LastX86ProcessorMark-FirstX86ProcessorMark-1
NumX86Processors = LastX86ProcessorMark-FirstX86ProcessorMark-1,
NumRISCVProcessors = LastRISCVProcessorMark-FirstRISCVProcessorMark-1

};

Expand Down Expand Up @@ -159,7 +164,12 @@ enum TR_Processor
TR_LastX86Processor,
TR_X86ProcessorAMDOpteron = TR_LastX86Processor,

TR_LastProcessor = TR_LastX86Processor,
TR_FirstRISCVProcessor,
TR_RV64G,
TR_DefaultRISCVProcessor = TR_RV64G,
TR_LastRISCVProcessor = TR_RV64G,

TR_LastProcessor = TR_LastRISCVProcessor,

TR_NumberOfProcessors
};
Expand Down
27 changes: 27 additions & 0 deletions compiler/riscv/env/RVProcessorEnum.hpp
@@ -0,0 +1,27 @@
/*******************************************************************************
* Copyright (c) 2020, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at http://eclipse.org/legal/epl-2.0
* or the Apache License, Version 2.0 which accompanies this distribution
* and is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License, v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* 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-exception
*******************************************************************************/

/*
* This file will be included within an enum. Only comments and enumerator
* definitions are permitted.
*/

RV64G,

0 comments on commit a24d33e

Please sign in to comment.