gem5
v24.0.0.0
Loading...
Searching...
No Matches
arch
mips
regs
int.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006 The Regents of The University of Michigan
3
* Copyright (c) 2007 MIPS Technologies, Inc.
4
* All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions are
8
* met: redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer;
10
* redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution;
13
* neither the name of the copyright holders nor the names of its
14
* contributors may be used to endorse or promote products derived from
15
* this software without specific prior written permission.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
*/
29
30
#ifndef __ARCH_MIPS_REGS_INT_HH__
31
#define __ARCH_MIPS_REGS_INT_HH__
32
33
#include "
cpu/reg_class.hh
"
34
#include "debug/IntRegs.hh"
35
36
namespace
gem5
37
{
38
namespace
MipsISA
39
{
40
41
// Constants Related to the number of registers
42
43
const
int
MaxShadowRegSets
= 16;
// Maximum number of shadow register sets
44
45
namespace
int_reg
46
{
47
48
enum :
RegIndex
49
{
50
_ZeroIdx
= 0,
51
52
_AtIdx
= 1,
53
54
_V0Idx
= 2,
55
_V1Idx
= 3,
56
57
_A0Idx
= 4,
58
_A1Idx
= 5,
59
_A2Idx
= 6,
60
_A3Idx
= 7,
61
62
_T0Idx
= 8,
63
_T1Idx
= 9,
64
_T2Idx
= 10,
65
_T3Idx
= 11,
66
_T4Idx
= 12,
67
_T5Idx
= 13,
68
_T6Idx
= 14,
69
_T7Idx
= 15,
70
71
_S0Idx
= 16,
72
_S1Idx
= 17,
73
_S2Idx
= 18,
74
_S3Idx
= 19,
75
_S4Idx
= 20,
76
_S5Idx
= 21,
77
_S6Idx
= 22,
78
_S7Idx
= 23,
79
80
_T8Idx
= 24,
81
_T9Idx
= 25,
82
83
_K0Idx
= 26,
84
_K1Idx
= 27,
85
86
_GpIdx
= 28,
87
88
_SpIdx
= 29,
89
90
_S8Idx
= 30,
91
_FpIdx
=
_S8Idx
,
92
93
_RaIdx
= 31,
94
95
NumArchRegs
,
96
97
_LoIdx
=
NumArchRegs
,
98
_DspLo0Idx
=
_LoIdx
,
99
_HiIdx
,
100
_DspHi0Idx
=
_HiIdx
,
101
_DspAcx0Idx
,
102
103
_DspLo1Idx
,
104
_DspHi1Idx
,
105
_DspAcx1Idx
,
106
107
_DspLo2Idx
,
108
_DspHi2Idx
,
109
_DspAcx2Idx
,
110
111
_DspLo3Idx
,
112
_DspHi3Idx
,
113
_DspAcx3Idx
,
114
115
_DspControlIdx
,
116
117
NumRegs
118
};
119
120
}
// namespace int_reg
121
122
inline
constexpr
RegClass
intRegClass
(
IntRegClass
,
IntRegClassName
,
123
int_reg::NumRegs
, debug::IntRegs);
124
125
namespace
int_reg
126
{
127
128
inline
constexpr
RegId
129
// Zero register.
130
Zero
=
intRegClass
[
_ZeroIdx
],
131
132
// Assembly temporary.
133
At
=
intRegClass
[
_AtIdx
],
134
135
// Value returned by subroutine.
136
V0
=
intRegClass
[
_V0Idx
],
137
V1
=
intRegClass
[
_V1Idx
],
138
139
// Arguments for subroutine.
140
A0
=
intRegClass
[
_A0Idx
],
141
A1
=
intRegClass
[
_A1Idx
],
142
A2
=
intRegClass
[
_A2Idx
],
143
A3
=
intRegClass
[
_A3Idx
],
144
145
// Temporaries.
146
T0
=
intRegClass
[
_T0Idx
],
147
T1
=
intRegClass
[
_T1Idx
],
148
T2
=
intRegClass
[
_T2Idx
],
149
T3
=
intRegClass
[
_T3Idx
],
150
T4
=
intRegClass
[
_T4Idx
],
151
T5
=
intRegClass
[
_T5Idx
],
152
T6
=
intRegClass
[
_T6Idx
],
153
T7
=
intRegClass
[
_T7Idx
],
154
T8
=
intRegClass
[
_T8Idx
],
155
T9
=
intRegClass
[
_T9Idx
],
156
157
// Subroutine registers.
158
S0
=
intRegClass
[
_S0Idx
],
159
S1
=
intRegClass
[
_S1Idx
],
160
S2
=
intRegClass
[
_S2Idx
],
161
S3
=
intRegClass
[
_S3Idx
],
162
S4
=
intRegClass
[
_S4Idx
],
163
S5
=
intRegClass
[
_S5Idx
],
164
S6
=
intRegClass
[
_S6Idx
],
165
S7
=
intRegClass
[
_S7Idx
],
166
167
// For use in an interrupt/trap handler.
168
K0
=
intRegClass
[
_K0Idx
],
169
K1
=
intRegClass
[
_K1Idx
],
170
171
// Global pointer.
172
Gp
=
intRegClass
[
_GpIdx
],
173
174
// Stack pointer.
175
Sp
=
intRegClass
[
_SpIdx
],
176
177
// Frame pointer.
178
Fp
=
intRegClass
[
_FpIdx
],
179
180
// Return address.
181
Ra
=
intRegClass
[
_RaIdx
],
182
183
DspLo0
=
intRegClass
[
_DspLo0Idx
],
184
DspHi0
=
intRegClass
[
_DspHi0Idx
],
185
DspAcx0
=
intRegClass
[
_DspAcx0Idx
],
186
187
DspLo1
=
intRegClass
[
_DspLo1Idx
],
188
DspHi1
=
intRegClass
[
_DspHi1Idx
],
189
DspAcx1
=
intRegClass
[
_DspAcx1Idx
],
190
191
DspLo2
=
intRegClass
[
_DspLo2Idx
],
192
DspHi2
=
intRegClass
[
_DspHi2Idx
],
193
DspAcx2
=
intRegClass
[
_DspAcx2Idx
],
194
195
DspLo3
=
intRegClass
[
_DspLo3Idx
],
196
DspHi3
=
intRegClass
[
_DspHi3Idx
],
197
DspAcx3
=
intRegClass
[
_DspAcx3Idx
],
198
199
DspControl
=
intRegClass
[
_DspControlIdx
];
200
201
// Register aliases.
202
inline
constexpr
auto
203
&
S8
=
Fp
,
204
205
&
Lo
=
DspLo0
,
206
&
Hi
=
DspHi0
,
207
208
&
SyscallSuccess
=
A3
;
209
210
}
// namespace int_reg
211
}
// namespace MipsISA
212
}
// namespace gem5
213
214
#endif
gem5::RegClass
Definition
reg_class.hh:186
gem5::RegId
Register ID: describe an architectural register with its class and index.
Definition
reg_class.hh:94
gem5::ArmISA::intRegClass
constexpr RegClass intRegClass
Definition
int.hh:173
gem5::MipsISA::int_reg::A1
constexpr RegId A1
Definition
int.hh:141
gem5::MipsISA::int_reg::V1
constexpr RegId V1
Definition
int.hh:137
gem5::MipsISA::int_reg::T1
constexpr RegId T1
Definition
int.hh:147
gem5::MipsISA::int_reg::DspHi1
constexpr RegId DspHi1
Definition
int.hh:188
gem5::MipsISA::int_reg::Lo
constexpr auto & Lo
Definition
int.hh:205
gem5::MipsISA::int_reg::DspHi0
constexpr RegId DspHi0
Definition
int.hh:184
gem5::MipsISA::int_reg::Zero
constexpr RegId Zero
Definition
int.hh:130
gem5::MipsISA::int_reg::DspAcx2
constexpr RegId DspAcx2
Definition
int.hh:193
gem5::MipsISA::int_reg::T5
constexpr RegId T5
Definition
int.hh:151
gem5::MipsISA::int_reg::SyscallSuccess
constexpr auto & SyscallSuccess
Definition
int.hh:208
gem5::MipsISA::int_reg::T3
constexpr RegId T3
Definition
int.hh:149
gem5::MipsISA::int_reg::T4
constexpr RegId T4
Definition
int.hh:150
gem5::MipsISA::int_reg::T9
constexpr RegId T9
Definition
int.hh:155
gem5::MipsISA::int_reg::DspAcx0
constexpr RegId DspAcx0
Definition
int.hh:185
gem5::MipsISA::int_reg::Gp
constexpr RegId Gp
Definition
int.hh:172
gem5::MipsISA::int_reg::S0
constexpr RegId S0
Definition
int.hh:158
gem5::MipsISA::int_reg::K0
constexpr RegId K0
Definition
int.hh:168
gem5::MipsISA::int_reg::A0
constexpr RegId A0
Definition
int.hh:140
gem5::MipsISA::int_reg::DspHi3
constexpr RegId DspHi3
Definition
int.hh:196
gem5::MipsISA::int_reg::Ra
constexpr RegId Ra
Definition
int.hh:181
gem5::MipsISA::int_reg::DspHi2
constexpr RegId DspHi2
Definition
int.hh:192
gem5::MipsISA::int_reg::S8
constexpr auto & S8
Definition
int.hh:203
gem5::MipsISA::int_reg::S2
constexpr RegId S2
Definition
int.hh:160
gem5::MipsISA::int_reg::DspLo0
constexpr RegId DspLo0
Definition
int.hh:183
gem5::MipsISA::int_reg::Hi
constexpr auto & Hi
Definition
int.hh:206
gem5::MipsISA::int_reg::S7
constexpr RegId S7
Definition
int.hh:165
gem5::MipsISA::int_reg::DspLo3
constexpr RegId DspLo3
Definition
int.hh:195
gem5::MipsISA::int_reg::T7
constexpr RegId T7
Definition
int.hh:153
gem5::MipsISA::int_reg::T0
constexpr RegId T0
Definition
int.hh:146
gem5::MipsISA::int_reg::V0
constexpr RegId V0
Definition
int.hh:136
gem5::MipsISA::int_reg::DspAcx3
constexpr RegId DspAcx3
Definition
int.hh:197
gem5::MipsISA::int_reg::At
constexpr RegId At
Definition
int.hh:133
gem5::MipsISA::int_reg::A2
constexpr RegId A2
Definition
int.hh:142
gem5::MipsISA::int_reg::DspControl
constexpr RegId DspControl
Definition
int.hh:199
gem5::MipsISA::int_reg::Sp
constexpr RegId Sp
Definition
int.hh:175
gem5::MipsISA::int_reg::DspLo2
constexpr RegId DspLo2
Definition
int.hh:191
gem5::MipsISA::int_reg::S6
constexpr RegId S6
Definition
int.hh:164
gem5::MipsISA::int_reg::A3
constexpr RegId A3
Definition
int.hh:143
gem5::MipsISA::int_reg::T6
constexpr RegId T6
Definition
int.hh:152
gem5::MipsISA::int_reg::S1
constexpr RegId S1
Definition
int.hh:159
gem5::MipsISA::int_reg::S5
constexpr RegId S5
Definition
int.hh:163
gem5::MipsISA::int_reg::DspLo1
constexpr RegId DspLo1
Definition
int.hh:187
gem5::MipsISA::int_reg::S3
constexpr RegId S3
Definition
int.hh:161
gem5::MipsISA::int_reg::T2
constexpr RegId T2
Definition
int.hh:148
gem5::MipsISA::int_reg::_ZeroIdx
@ _ZeroIdx
Definition
int.hh:50
gem5::MipsISA::int_reg::_DspHi3Idx
@ _DspHi3Idx
Definition
int.hh:112
gem5::MipsISA::int_reg::_A2Idx
@ _A2Idx
Definition
int.hh:59
gem5::MipsISA::int_reg::_S3Idx
@ _S3Idx
Definition
int.hh:74
gem5::MipsISA::int_reg::_T5Idx
@ _T5Idx
Definition
int.hh:67
gem5::MipsISA::int_reg::_DspHi1Idx
@ _DspHi1Idx
Definition
int.hh:104
gem5::MipsISA::int_reg::_DspHi2Idx
@ _DspHi2Idx
Definition
int.hh:108
gem5::MipsISA::int_reg::_GpIdx
@ _GpIdx
Definition
int.hh:86
gem5::MipsISA::int_reg::_T8Idx
@ _T8Idx
Definition
int.hh:80
gem5::MipsISA::int_reg::_HiIdx
@ _HiIdx
Definition
int.hh:99
gem5::MipsISA::int_reg::_AtIdx
@ _AtIdx
Definition
int.hh:52
gem5::MipsISA::int_reg::_T6Idx
@ _T6Idx
Definition
int.hh:68
gem5::MipsISA::int_reg::_DspLo0Idx
@ _DspLo0Idx
Definition
int.hh:98
gem5::MipsISA::int_reg::_RaIdx
@ _RaIdx
Definition
int.hh:93
gem5::MipsISA::int_reg::_DspLo3Idx
@ _DspLo3Idx
Definition
int.hh:111
gem5::MipsISA::int_reg::NumRegs
@ NumRegs
Definition
int.hh:117
gem5::MipsISA::int_reg::_DspLo1Idx
@ _DspLo1Idx
Definition
int.hh:103
gem5::MipsISA::int_reg::_S0Idx
@ _S0Idx
Definition
int.hh:71
gem5::MipsISA::int_reg::_A3Idx
@ _A3Idx
Definition
int.hh:60
gem5::MipsISA::int_reg::_T4Idx
@ _T4Idx
Definition
int.hh:66
gem5::MipsISA::int_reg::_S7Idx
@ _S7Idx
Definition
int.hh:78
gem5::MipsISA::int_reg::_T1Idx
@ _T1Idx
Definition
int.hh:63
gem5::MipsISA::int_reg::_T7Idx
@ _T7Idx
Definition
int.hh:69
gem5::MipsISA::int_reg::_K0Idx
@ _K0Idx
Definition
int.hh:83
gem5::MipsISA::int_reg::_V0Idx
@ _V0Idx
Definition
int.hh:54
gem5::MipsISA::int_reg::_S5Idx
@ _S5Idx
Definition
int.hh:76
gem5::MipsISA::int_reg::NumArchRegs
@ NumArchRegs
Definition
int.hh:95
gem5::MipsISA::int_reg::_T9Idx
@ _T9Idx
Definition
int.hh:81
gem5::MipsISA::int_reg::_DspAcx2Idx
@ _DspAcx2Idx
Definition
int.hh:109
gem5::MipsISA::int_reg::_A0Idx
@ _A0Idx
Definition
int.hh:57
gem5::MipsISA::int_reg::_DspAcx3Idx
@ _DspAcx3Idx
Definition
int.hh:113
gem5::MipsISA::int_reg::_DspLo2Idx
@ _DspLo2Idx
Definition
int.hh:107
gem5::MipsISA::int_reg::_T2Idx
@ _T2Idx
Definition
int.hh:64
gem5::MipsISA::int_reg::_S6Idx
@ _S6Idx
Definition
int.hh:77
gem5::MipsISA::int_reg::_S8Idx
@ _S8Idx
Definition
int.hh:90
gem5::MipsISA::int_reg::_DspAcx0Idx
@ _DspAcx0Idx
Definition
int.hh:101
gem5::MipsISA::int_reg::_V1Idx
@ _V1Idx
Definition
int.hh:55
gem5::MipsISA::int_reg::_DspAcx1Idx
@ _DspAcx1Idx
Definition
int.hh:105
gem5::MipsISA::int_reg::_FpIdx
@ _FpIdx
Definition
int.hh:91
gem5::MipsISA::int_reg::_A1Idx
@ _A1Idx
Definition
int.hh:58
gem5::MipsISA::int_reg::_K1Idx
@ _K1Idx
Definition
int.hh:84
gem5::MipsISA::int_reg::_T3Idx
@ _T3Idx
Definition
int.hh:65
gem5::MipsISA::int_reg::_SpIdx
@ _SpIdx
Definition
int.hh:88
gem5::MipsISA::int_reg::_S4Idx
@ _S4Idx
Definition
int.hh:75
gem5::MipsISA::int_reg::_S1Idx
@ _S1Idx
Definition
int.hh:72
gem5::MipsISA::int_reg::_DspHi0Idx
@ _DspHi0Idx
Definition
int.hh:100
gem5::MipsISA::int_reg::_S2Idx
@ _S2Idx
Definition
int.hh:73
gem5::MipsISA::int_reg::_DspControlIdx
@ _DspControlIdx
Definition
int.hh:115
gem5::MipsISA::int_reg::_T0Idx
@ _T0Idx
Definition
int.hh:62
gem5::MipsISA::int_reg::_LoIdx
@ _LoIdx
Definition
int.hh:97
gem5::MipsISA::int_reg::S4
constexpr RegId S4
Definition
int.hh:162
gem5::MipsISA::int_reg::K1
constexpr RegId K1
Definition
int.hh:169
gem5::MipsISA::int_reg::T8
constexpr RegId T8
Definition
int.hh:154
gem5::MipsISA::int_reg::Fp
constexpr RegId Fp
Definition
int.hh:178
gem5::MipsISA::int_reg::DspAcx1
constexpr RegId DspAcx1
Definition
int.hh:189
gem5::MipsISA::MaxShadowRegSets
const int MaxShadowRegSets
Definition
int.hh:43
gem5
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition
binary32.hh:36
gem5::RegIndex
uint16_t RegIndex
Definition
types.hh:176
gem5::IntRegClassName
constexpr char IntRegClassName[]
Definition
reg_class.hh:75
gem5::IntRegClass
@ IntRegClass
Integer register.
Definition
reg_class.hh:61
reg_class.hh
Generated on Tue Jun 18 2024 16:23:59 for gem5 by
doxygen
1.11.0