gem5
[DEVELOP-FOR-23.0]
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
r
s
t
v
x
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
v
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Typedefs
a
b
c
d
g
h
i
l
m
r
s
t
u
w
Enumerations
b
h
i
o
p
Enumerator
h
i
o
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
arch
riscv
regs
int.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 ARM Limited
3
* Copyright (c) 2014-2015 Sven Karlsson
4
* Copyright (c) 2019 Yifei Liu
5
* Copyright (c) 2020 Barkhausen Institut
6
* Copyright (c) 2021 StreamComputing Corp
7
* All rights reserved
8
*
9
* The license below extends only to copyright in the software and shall
10
* not be construed as granting a license to any other intellectual
11
* property including but not limited to intellectual property relating
12
* to a hardware implementation of the functionality of the software
13
* licensed hereunder. You may use the software subject to the license
14
* terms below provided that you ensure that this notice is replicated
15
* unmodified and in its entirety in all distributions of the software,
16
* modified or unmodified, in source code or in binary form.
17
*
18
* Copyright (c) 2016 RISC-V Foundation
19
* Copyright (c) 2016 The University of Virginia
20
* All rights reserved.
21
*
22
* Redistribution and use in source and binary forms, with or without
23
* modification, are permitted provided that the following conditions are
24
* met: redistributions of source code must retain the above copyright
25
* notice, this list of conditions and the following disclaimer;
26
* redistributions in binary form must reproduce the above copyright
27
* notice, this list of conditions and the following disclaimer in the
28
* documentation and/or other materials provided with the distribution;
29
* neither the name of the copyright holders nor the names of its
30
* contributors may be used to endorse or promote products derived from
31
* this software without specific prior written permission.
32
*
33
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
36
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
38
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
40
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
41
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
43
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
*/
45
46
#ifndef __ARCH_RISCV_REGS_INT_HH__
47
#define __ARCH_RISCV_REGS_INT_HH__
48
49
#include <string>
50
#include <vector>
51
52
#include "
cpu/reg_class.hh
"
53
#include "debug/IntRegs.hh"
54
55
namespace
gem5
56
{
57
58
namespace
RiscvISA
59
{
60
61
namespace
int_reg
62
{
63
64
enum :
RegIndex
65
{
66
_ZeroIdx
,
_RaIdx
,
_SpIdx
,
_GpIdx
,
67
_TpIdx
,
_T0Idx
,
_T1Idx
,
_T2Idx
,
68
_S0Idx
,
_S1Idx
,
_A0Idx
,
_A1Idx
,
69
_A2Idx
,
_A3Idx
,
_A4Idx
,
_A5Idx
,
70
_A6Idx
,
_A7Idx
,
_S2Idx
,
_S3Idx
,
71
_S4Idx
,
_S5Idx
,
_S6Idx
,
_S7Idx
,
72
_S8Idx
,
_S9Idx
,
_S10Idx
,
_S11Idx
,
73
_T3Idx
,
_T4Idx
,
_T5Idx
,
_T6Idx
,
74
75
NumArchRegs
,
76
77
_Ureg0Idx
=
NumArchRegs
,
78
79
NumRegs
80
};
81
82
}
// namespace int_reg
83
84
inline
constexpr
RegClass
intRegClass
(
IntRegClass
,
IntRegClassName
,
85
int_reg::NumRegs
, debug::IntRegs);
86
87
namespace
int_reg
88
{
89
90
inline
constexpr
RegId
91
Zero
=
intRegClass
[
_ZeroIdx
],
92
Ra
=
intRegClass
[
_RaIdx
],
93
Sp
=
intRegClass
[
_SpIdx
],
94
Gp
=
intRegClass
[
_GpIdx
],
95
Tp
=
intRegClass
[
_TpIdx
],
96
T0
=
intRegClass
[
_T0Idx
],
97
T1
=
intRegClass
[
_T1Idx
],
98
T2
=
intRegClass
[
_T2Idx
],
99
S0
=
intRegClass
[
_S0Idx
],
100
S1
=
intRegClass
[
_S1Idx
],
101
A0
=
intRegClass
[
_A0Idx
],
102
A1
=
intRegClass
[
_A1Idx
],
103
A2
=
intRegClass
[
_A2Idx
],
104
A3
=
intRegClass
[
_A3Idx
],
105
A4
=
intRegClass
[
_A4Idx
],
106
A5
=
intRegClass
[
_A5Idx
],
107
A6
=
intRegClass
[
_A6Idx
],
108
A7
=
intRegClass
[
_A7Idx
],
109
S2
=
intRegClass
[
_S2Idx
],
110
S3
=
intRegClass
[
_S3Idx
],
111
S4
=
intRegClass
[
_S4Idx
],
112
S5
=
intRegClass
[
_S5Idx
],
113
S6
=
intRegClass
[
_S6Idx
],
114
S7
=
intRegClass
[
_S7Idx
],
115
S8
=
intRegClass
[
_S8Idx
],
116
S9
=
intRegClass
[
_S9Idx
],
117
S10
=
intRegClass
[
_S10Idx
],
118
S11
=
intRegClass
[
_S11Idx
],
119
T3
=
intRegClass
[
_T3Idx
],
120
T4
=
intRegClass
[
_T4Idx
],
121
T5
=
intRegClass
[
_T5Idx
],
122
T6
=
intRegClass
[
_T6Idx
],
123
Ureg0
=
intRegClass
[
_Ureg0Idx
];
124
125
const
std::vector<std::string>
RegNames
= {
126
"zero"
,
"ra"
,
"sp"
,
"gp"
,
127
"tp"
,
"t0"
,
"t1"
,
"t2"
,
128
"s0"
,
"s1"
,
"a0"
,
"a1"
,
129
"a2"
,
"a3"
,
"a4"
,
"a5"
,
130
"a6"
,
"a7"
,
"s2"
,
"s3"
,
131
"s4"
,
"s5"
,
"s6"
,
"s7"
,
132
"s8"
,
"s9"
,
"s10"
,
"s11"
,
133
"t3"
,
"t4"
,
"t5"
,
"t6"
134
};
135
136
}
// namespace int_reg
137
138
// Semantically meaningful register indices
139
inline
constexpr
auto
140
&
ReturnAddrReg
=
int_reg::Ra
,
141
&
StackPointerReg
=
int_reg::Sp
,
142
&
ThreadPointerReg
=
int_reg::Tp
,
143
&
ReturnValueReg
=
int_reg::A0
,
144
&
AMOTempReg
=
int_reg::Ureg0
,
145
&
SyscallNumReg
=
int_reg::A7
;
146
147
inline
constexpr
RegId
ArgumentRegs
[] = {
148
int_reg::A0
,
int_reg::A1
,
int_reg::A2
,
int_reg::A3
,
149
int_reg::A4
,
int_reg::A5
,
int_reg::A6
,
int_reg::A7
150
};
151
152
}
// namespace RiscvISA
153
}
// namespace gem5
154
155
#endif // __ARCH_RISCV_REGS_INT_HH__
gem5::RiscvISA::int_reg::_T2Idx
@ _T2Idx
Definition:
int.hh:67
gem5::RiscvISA::int_reg::S9
constexpr RegId S9
Definition:
int.hh:116
gem5::RiscvISA::int_reg::_S10Idx
@ _S10Idx
Definition:
int.hh:72
gem5::RiscvISA::int_reg::_A0Idx
@ _A0Idx
Definition:
int.hh:68
gem5::RiscvISA::int_reg::_S0Idx
@ _S0Idx
Definition:
int.hh:68
gem5::RiscvISA::int_reg::_S9Idx
@ _S9Idx
Definition:
int.hh:72
gem5::RiscvISA::StackPointerReg
constexpr auto & StackPointerReg
Definition:
int.hh:141
gem5::RiscvISA::int_reg::_S5Idx
@ _S5Idx
Definition:
int.hh:71
gem5::RiscvISA::int_reg::_S2Idx
@ _S2Idx
Definition:
int.hh:70
gem5::RiscvISA::int_reg::Ureg0
constexpr RegId Ureg0
Definition:
int.hh:123
gem5::RiscvISA::int_reg::_TpIdx
@ _TpIdx
Definition:
int.hh:67
gem5::RiscvISA::int_reg::Tp
constexpr RegId Tp
Definition:
int.hh:95
gem5::RiscvISA::int_reg::S0
constexpr RegId S0
Definition:
int.hh:99
gem5::RiscvISA::int_reg::T1
constexpr RegId T1
Definition:
int.hh:97
gem5::RiscvISA::ArgumentRegs
constexpr RegId ArgumentRegs[]
Definition:
int.hh:147
gem5::RiscvISA::int_reg::T3
constexpr RegId T3
Definition:
int.hh:119
gem5::RiscvISA::int_reg::_A3Idx
@ _A3Idx
Definition:
int.hh:69
gem5::RiscvISA::int_reg::_A7Idx
@ _A7Idx
Definition:
int.hh:70
gem5::RiscvISA::int_reg::_S7Idx
@ _S7Idx
Definition:
int.hh:71
gem5::RiscvISA::int_reg::_T3Idx
@ _T3Idx
Definition:
int.hh:73
gem5::RiscvISA::int_reg::T0
constexpr RegId T0
Definition:
int.hh:96
gem5::RiscvISA::SyscallNumReg
constexpr auto & SyscallNumReg
Definition:
int.hh:145
std::vector< std::string >
gem5::RiscvISA::int_reg::A2
constexpr RegId A2
Definition:
int.hh:103
gem5::RiscvISA::ReturnValueReg
constexpr auto & ReturnValueReg
Definition:
int.hh:143
gem5::RiscvISA::int_reg::Gp
constexpr RegId Gp
Definition:
int.hh:94
gem5::RiscvISA::ThreadPointerReg
constexpr auto & ThreadPointerReg
Definition:
int.hh:142
gem5::RiscvISA::int_reg::_GpIdx
@ _GpIdx
Definition:
int.hh:66
gem5::RiscvISA::int_reg::S1
constexpr RegId S1
Definition:
int.hh:100
gem5::RiscvISA::int_reg::_T1Idx
@ _T1Idx
Definition:
int.hh:67
gem5::RiscvISA::int_reg::T6
constexpr RegId T6
Definition:
int.hh:122
gem5::RiscvISA::int_reg::A6
constexpr RegId A6
Definition:
int.hh:107
gem5::RiscvISA::int_reg::_ZeroIdx
@ _ZeroIdx
Definition:
int.hh:66
gem5::RiscvISA::int_reg::_T0Idx
@ _T0Idx
Definition:
int.hh:67
gem5::RiscvISA::int_reg::_S1Idx
@ _S1Idx
Definition:
int.hh:68
gem5::RiscvISA::int_reg::S4
constexpr RegId S4
Definition:
int.hh:111
gem5::RiscvISA::int_reg::S7
constexpr RegId S7
Definition:
int.hh:114
gem5::RiscvISA::int_reg::S3
constexpr RegId S3
Definition:
int.hh:110
gem5::RiscvISA::int_reg::_RaIdx
@ _RaIdx
Definition:
int.hh:66
gem5::RiscvISA::int_reg::S8
constexpr RegId S8
Definition:
int.hh:115
gem5::RiscvISA::int_reg::S2
constexpr RegId S2
Definition:
int.hh:109
gem5::RiscvISA::int_reg::_SpIdx
@ _SpIdx
Definition:
int.hh:66
gem5::RiscvISA::int_reg::_A1Idx
@ _A1Idx
Definition:
int.hh:68
gem5::IntRegClassName
constexpr char IntRegClassName[]
Definition:
reg_class.hh:74
gem5::RiscvISA::int_reg::T2
constexpr RegId T2
Definition:
int.hh:98
gem5::RiscvISA::int_reg::A1
constexpr RegId A1
Definition:
int.hh:102
gem5::RiscvISA::ReturnAddrReg
constexpr auto & ReturnAddrReg
Definition:
int.hh:140
gem5::RiscvISA::int_reg::S6
constexpr RegId S6
Definition:
int.hh:113
gem5::RiscvISA::intRegClass
constexpr RegClass intRegClass(IntRegClass, IntRegClassName, int_reg::NumRegs, debug::IntRegs)
gem5::RiscvISA::int_reg::T5
constexpr RegId T5
Definition:
int.hh:121
gem5::RiscvISA::int_reg::A7
constexpr RegId A7
Definition:
int.hh:108
gem5::RegClass
Definition:
reg_class.hh:184
gem5::RiscvISA::int_reg::T4
constexpr RegId T4
Definition:
int.hh:120
gem5::RiscvISA::int_reg::A0
constexpr RegId A0
Definition:
int.hh:101
gem5::RiscvISA::int_reg::_Ureg0Idx
@ _Ureg0Idx
Definition:
int.hh:77
gem5::RiscvISA::int_reg::A5
constexpr RegId A5
Definition:
int.hh:106
gem5::IntRegClass
@ IntRegClass
Integer register.
Definition:
reg_class.hh:60
gem5::RiscvISA::int_reg::S10
constexpr RegId S10
Definition:
int.hh:117
gem5::RiscvISA::int_reg::S5
constexpr RegId S5
Definition:
int.hh:112
gem5::RiscvISA::int_reg::_A6Idx
@ _A6Idx
Definition:
int.hh:70
gem5::RiscvISA::int_reg::_T6Idx
@ _T6Idx
Definition:
int.hh:73
gem5::RiscvISA::int_reg::_S4Idx
@ _S4Idx
Definition:
int.hh:71
gem5::RiscvISA::int_reg::Sp
constexpr RegId Sp
Definition:
int.hh:93
gem5::RiscvISA::int_reg::_A4Idx
@ _A4Idx
Definition:
int.hh:69
gem5::RiscvISA::int_reg::_S11Idx
@ _S11Idx
Definition:
int.hh:72
gem5::RiscvISA::int_reg::S11
constexpr RegId S11
Definition:
int.hh:118
gem5::RiscvISA::int_reg::_S3Idx
@ _S3Idx
Definition:
int.hh:70
gem5::RiscvISA::int_reg::_T4Idx
@ _T4Idx
Definition:
int.hh:73
reg_class.hh
gem5::RiscvISA::int_reg::_A5Idx
@ _A5Idx
Definition:
int.hh:69
gem5::RiscvISA::int_reg::NumArchRegs
@ NumArchRegs
Definition:
int.hh:75
gem5::RiscvISA::int_reg::_A2Idx
@ _A2Idx
Definition:
int.hh:69
gem5::RiscvISA::int_reg::RegNames
const std::vector< std::string > RegNames
Definition:
int.hh:125
gem5::RegIndex
uint16_t RegIndex
Definition:
types.hh:176
gem5::RiscvISA::int_reg::Zero
constexpr RegId Zero
Definition:
int.hh:91
gem5::RiscvISA::int_reg::A3
constexpr RegId A3
Definition:
int.hh:104
gem5::RiscvISA::AMOTempReg
constexpr auto & AMOTempReg
Definition:
int.hh:144
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
gpu_translation_state.hh:37
gem5::RiscvISA::int_reg::A4
constexpr RegId A4
Definition:
int.hh:105
gem5::RiscvISA::int_reg::_T5Idx
@ _T5Idx
Definition:
int.hh:73
gem5::RiscvISA::int_reg::Ra
constexpr RegId Ra
Definition:
int.hh:92
gem5::RiscvISA::int_reg::_S6Idx
@ _S6Idx
Definition:
int.hh:71
gem5::RiscvISA::int_reg::_S8Idx
@ _S8Idx
Definition:
int.hh:72
gem5::RegId
Register ID: describe an architectural register with its class and index.
Definition:
reg_class.hh:92
gem5::RiscvISA::int_reg::NumRegs
@ NumRegs
Definition:
int.hh:79
Generated on Sun Jul 30 2023 01:56:49 for gem5 by
doxygen
1.8.17