gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Enumerations | Functions | Variables
reg_class.hh File Reference
#include <cassert>
#include <cstddef>
#include "arch/registers.hh"
#include "config/the_isa.hh"

Go to the source code of this file.

Enumerations

enum  RegClass { IntRegClass, FloatRegClass, CCRegClass, MiscRegClass }
 Enumerate the classes of registers. More...
 

Functions

RegClass regIdxToClass (TheISA::RegIndex reg_idx, TheISA::RegIndex *rel_reg_idx=NULL)
 Map a 'unified' architectural register index to its register class. More...
 

Variables

const int NumRegClasses = MiscRegClass + 1
 Number of register classes. More...
 
const char * RegClassStrings []
 Map enum values to strings for debugging. More...
 

Enumeration Type Documentation

enum RegClass

Enumerate the classes of registers.

Enumerator
IntRegClass 

Integer register.

FloatRegClass 

Floating-point register.

CCRegClass 

Condition-code register.

MiscRegClass 

Control (misc) register.

Definition at line 41 of file reg_class.hh.

Function Documentation

RegClass regIdxToClass ( TheISA::RegIndex  reg_idx,
TheISA::RegIndex *  rel_reg_idx = NULL 
)
inline

Map a 'unified' architectural register index to its register class.

The unified architectural register index space is used to represent all architectural register identifiers in a single contiguous index space. See http://gem5.org/Register_Indexing.

Parameters
reg_idxUnified-space register index
rel_reg_idxOptional output param pointer; if non-NULL, location will be written with the relative register index for reg_idx
Returns
Register class of reg_idx

Definition at line 66 of file reg_class.hh.

References AlphaISA::CC_Reg_Base, CCRegClass, FloatRegClass, AlphaISA::FP_Reg_Base, IntRegClass, AlphaISA::Max_Reg_Index, AlphaISA::Misc_Reg_Base, MiscRegClass, and ArmISA::offset.

Referenced by Checker< Impl >::copyResult(), Minor::Scoreboard::findIndex(), Minor::flattenRegIndex(), BaseO3DynInst< Impl >::forwardOldRegs(), MrsOp::generateDisassembly(), UnifiedRenameMap::lookup(), PowerISA::PowerStaticInst::printReg(), X86ISA::X86StaticInst::printReg(), ArmISA::ArmStaticInst::printReg(), Minor::printRegName(), UnifiedRenameMap::rename(), DefaultRename< Impl >::renameDestRegs(), DefaultRename< Impl >::renameSrcRegs(), UnifiedRenameMap::setEntry(), and ElasticTrace::updateRegDep().

Variable Documentation

const int NumRegClasses = MiscRegClass + 1

Number of register classes.

This value is not part of the enum, because putting it there makes the compiler complain about unhandled cases in some switch statements.

Definition at line 51 of file reg_class.hh.

const char* RegClassStrings[]

Map enum values to strings for debugging.

Definition at line 33 of file reg_class.cc.

Referenced by UnifiedRenameMap::lookup(), UnifiedRenameMap::rename(), DefaultRename< Impl >::renameSrcRegs(), and UnifiedRenameMap::setEntry().


Generated on Fri Jun 9 2017 13:03:57 for gem5 by doxygen 1.8.6