gem5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
arch
alpha
registers.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2003-2005 The Regents of The University of Michigan
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are
7
* met: redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer;
9
* redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution;
12
* neither the name of the copyright holders nor the names of its
13
* contributors may be used to endorse or promote products derived from
14
* this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*
28
* Authors: Gabe Black
29
*/
30
31
#ifndef __ARCH_ALPHA_REGISTERS_HH__
32
#define __ARCH_ALPHA_REGISTERS_HH__
33
34
#include "arch/alpha/generated/max_inst_regs.hh"
35
#include "
arch/alpha/ipr.hh
"
36
#include "
base/types.hh
"
37
38
namespace
AlphaISA {
39
40
using
AlphaISAInst::MaxInstSrcRegs
;
41
using
AlphaISAInst::MaxInstDestRegs;
42
43
// Locked read/write flags are can't be detected by the ISA parser
44
const
int
MaxMiscDestRegs
=
AlphaISAInst::MaxMiscDestRegs
+ 1;
45
46
typedef
uint8_t
RegIndex
;
47
typedef
uint64_t
IntReg
;
48
49
// floating point register file entry type
50
typedef
double
FloatReg
;
51
typedef
uint64_t
FloatRegBits
;
52
53
// control register file contents
54
typedef
uint64_t
MiscReg
;
55
56
// dummy typedef since we don't have CC regs
57
typedef
uint8_t
CCReg
;
58
59
union
AnyReg
60
{
61
IntReg
intreg
;
62
FloatReg
fpreg
;
63
MiscReg
ctrlreg
;
64
};
65
66
enum
MiscRegIndex
67
{
68
MISCREG_FPCR
=
NumInternalProcRegs
,
69
MISCREG_UNIQ
,
70
MISCREG_LOCKFLAG
,
71
MISCREG_LOCKADDR
,
72
MISCREG_INTR
,
73
NUM_MISCREGS
74
};
75
76
// semantically meaningful register indices
77
const
RegIndex
ZeroReg
= 31;
// architecturally meaningful
78
// the rest of these depend on the ABI
79
const
RegIndex
StackPointerReg
= 30;
80
const
RegIndex
GlobalPointerReg
= 29;
81
const
RegIndex
ProcedureValueReg
= 27;
82
const
RegIndex
ReturnAddressReg
= 26;
83
const
RegIndex
ReturnValueReg
= 0;
84
const
RegIndex
FramePointerReg
= 15;
85
86
const
RegIndex
SyscallNumReg
= 0;
87
const
RegIndex
FirstArgumentReg
= 16;
88
const
RegIndex
SyscallPseudoReturnReg
= 20;
89
const
RegIndex
SyscallSuccessReg
= 19;
90
91
const
int
NumIntArchRegs
= 32;
92
const
int
NumPALShadowRegs
= 8;
93
const
int
NumFloatArchRegs
= 32;
94
95
const
int
NumIntRegs
=
NumIntArchRegs
+
NumPALShadowRegs
;
96
const
int
NumFloatRegs
=
NumFloatArchRegs
;
97
const
int
NumCCRegs
= 0;
98
const
int
NumMiscRegs
=
NUM_MISCREGS
;
99
100
const
int
TotalNumRegs
=
101
NumIntRegs
+
NumFloatRegs
+
NumMiscRegs
;
102
103
// These enumerate all the registers for dependence tracking.
104
enum
DependenceTags
{
105
// 0..31 are the integer regs 0..31
106
// 32..63 are the FP regs 0..31, i.e. use (reg + FP_Reg_Base)
107
FP_Reg_Base
=
NumIntRegs
,
108
CC_Reg_Base
=
FP_Reg_Base
+
NumFloatRegs
,
109
Misc_Reg_Base
=
CC_Reg_Base
+
NumCCRegs
,
// NumCCRegs == 0
110
Max_Reg_Index
=
Misc_Reg_Base
+
NumMiscRegs
+
NumInternalProcRegs
111
};
112
113
}
// namespace AlphaISA
114
115
#endif // __ARCH_ALPHA_REGFILE_HH__
AlphaISA::SyscallNumReg
const RegIndex SyscallNumReg
Definition:
registers.hh:86
AlphaISA::CCReg
uint8_t CCReg
Definition:
registers.hh:57
AlphaISA::MISCREG_INTR
Definition:
registers.hh:72
AlphaISA::FirstArgumentReg
const RegIndex FirstArgumentReg
Definition:
registers.hh:87
AlphaISA::MISCREG_FPCR
Definition:
registers.hh:68
ipr.hh
AlphaISA::MiscRegIndex
MiscRegIndex
Definition:
registers.hh:66
AlphaISA::NUM_MISCREGS
Definition:
registers.hh:73
AlphaISA::NumFloatRegs
const int NumFloatRegs
Definition:
registers.hh:96
AlphaISA::AnyReg
Definition:
registers.hh:59
AlphaISA::MiscReg
uint64_t MiscReg
Definition:
registers.hh:54
AlphaISA::FP_Reg_Base
Definition:
registers.hh:107
ArmISA::MaxInstSrcRegs
const int MaxInstSrcRegs
Definition:
registers.hh:56
AlphaISA::Misc_Reg_Base
Definition:
registers.hh:109
AlphaISA::NumFloatArchRegs
const int NumFloatArchRegs
Definition:
registers.hh:93
AlphaISA::ReturnAddressReg
const RegIndex ReturnAddressReg
Definition:
registers.hh:82
AlphaISA::MaxMiscDestRegs
const int MaxMiscDestRegs
Definition:
registers.hh:44
RiscvISA::MaxMiscDestRegs
const int MaxMiscDestRegs
Definition:
registers.hh:61
AlphaISA::RegIndex
uint8_t RegIndex
Definition:
registers.hh:46
AlphaISA::FloatRegBits
uint64_t FloatRegBits
Definition:
registers.hh:51
AlphaISA::NumCCRegs
const int NumCCRegs
Definition:
registers.hh:97
AlphaISA::ZeroReg
const RegIndex ZeroReg
Definition:
registers.hh:77
AlphaISA::MISCREG_LOCKFLAG
Definition:
registers.hh:70
AlphaISA::StackPointerReg
const RegIndex StackPointerReg
Definition:
registers.hh:79
AlphaISA::SyscallPseudoReturnReg
const RegIndex SyscallPseudoReturnReg
Definition:
registers.hh:88
AlphaISA::FloatReg
double FloatReg
Definition:
registers.hh:50
AlphaISA::NumPALShadowRegs
const int NumPALShadowRegs
Definition:
registers.hh:92
types.hh
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
AlphaISA::TotalNumRegs
const int TotalNumRegs
Definition:
registers.hh:100
AlphaISA::DependenceTags
DependenceTags
Definition:
registers.hh:104
AlphaISA::AnyReg::intreg
IntReg intreg
Definition:
registers.hh:61
AlphaISA::IntReg
uint64_t IntReg
Definition:
registers.hh:47
AlphaISA::NumMiscRegs
const int NumMiscRegs
Definition:
registers.hh:98
AlphaISA::Max_Reg_Index
Definition:
registers.hh:110
AlphaISA::NumIntArchRegs
const int NumIntArchRegs
Definition:
registers.hh:91
AlphaISA::ProcedureValueReg
const RegIndex ProcedureValueReg
Definition:
registers.hh:81
AlphaISA::MISCREG_UNIQ
Definition:
registers.hh:69
AlphaISA::FramePointerReg
const RegIndex FramePointerReg
Definition:
registers.hh:84
AlphaISA::MISCREG_LOCKADDR
Definition:
registers.hh:71
AlphaISA::AnyReg::fpreg
FloatReg fpreg
Definition:
registers.hh:62
AlphaISA::AnyReg::ctrlreg
MiscReg ctrlreg
Definition:
registers.hh:63
AlphaISA::ReturnValueReg
const RegIndex ReturnValueReg
Definition:
registers.hh:83
AlphaISA::GlobalPointerReg
const RegIndex GlobalPointerReg
Definition:
registers.hh:80
AlphaISA::SyscallSuccessReg
const RegIndex SyscallSuccessReg
Definition:
registers.hh:89
AlphaISA::NumInternalProcRegs
Definition:
ipr.hh:217
AlphaISA::NumIntRegs
const int NumIntRegs
Definition:
registers.hh:95
AlphaISA::CC_Reg_Base
Definition:
registers.hh:108
Generated on Fri Jun 9 2017 13:03:36 for gem5 by
doxygen
1.8.6