gem5
v19.0.0.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
+
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
m
n
o
p
r
s
t
u
v
w
x
+
Enumerations
a
b
c
d
e
f
i
l
m
o
p
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
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
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
arch
alpha
isa.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 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
#include "
arch/alpha/isa.hh
"
32
33
#include <cassert>
34
35
#include "
base/logging.hh
"
36
#include "
cpu/thread_context.hh
"
37
#include "params/AlphaISA.hh"
38
#include "
sim/serialize.hh
"
39
40
namespace
AlphaISA
41
{
42
43
ISA::ISA
(
Params
*
p
) :
BaseISA
(p),
system
(p->
system
)
44
{
45
clear
();
46
initializeIprTable
();
47
}
48
49
const
AlphaISAParams *
50
ISA::params
()
const
51
{
52
return
dynamic_cast<
const
Params
*
>
(
_params
);
53
}
54
55
void
56
ISA::serialize
(
CheckpointOut
&
cp
)
const
57
{
58
SERIALIZE_SCALAR
(
fpcr
);
59
SERIALIZE_SCALAR
(
uniq
);
60
SERIALIZE_SCALAR
(
lock_flag
);
61
SERIALIZE_SCALAR
(
lock_addr
);
62
SERIALIZE_ARRAY
(
ipr
,
NumInternalProcRegs
);
63
}
64
65
void
66
ISA::unserialize
(
CheckpointIn
&
cp
)
67
{
68
UNSERIALIZE_SCALAR
(
fpcr
);
69
UNSERIALIZE_SCALAR
(
uniq
);
70
UNSERIALIZE_SCALAR
(
lock_flag
);
71
UNSERIALIZE_SCALAR
(
lock_addr
);
72
UNSERIALIZE_ARRAY
(
ipr
,
NumInternalProcRegs
);
73
}
74
75
76
RegVal
77
ISA::readMiscRegNoEffect
(
int
misc_reg,
ThreadID
tid)
const
78
{
79
switch
(misc_reg) {
80
case
MISCREG_FPCR
:
81
return
fpcr
;
82
case
MISCREG_UNIQ
:
83
return
uniq
;
84
case
MISCREG_LOCKFLAG
:
85
return
lock_flag
;
86
case
MISCREG_LOCKADDR
:
87
return
lock_addr
;
88
case
MISCREG_INTR
:
89
return
intr_flag
;
90
default
:
91
assert(misc_reg <
NumInternalProcRegs
);
92
return
ipr
[misc_reg];
93
}
94
}
95
96
RegVal
97
ISA::readMiscReg
(
int
misc_reg,
ThreadContext
*tc,
ThreadID
tid)
98
{
99
switch
(misc_reg) {
100
case
MISCREG_FPCR
:
101
return
fpcr
;
102
case
MISCREG_UNIQ
:
103
return
uniq
;
104
case
MISCREG_LOCKFLAG
:
105
return
lock_flag
;
106
case
MISCREG_LOCKADDR
:
107
return
lock_addr
;
108
case
MISCREG_INTR
:
109
return
intr_flag
;
110
default
:
111
return
readIpr
(misc_reg, tc);
112
}
113
}
114
115
void
116
ISA::setMiscRegNoEffect
(
int
misc_reg,
RegVal
val
,
ThreadID
tid)
117
{
118
switch
(misc_reg) {
119
case
MISCREG_FPCR
:
120
fpcr
=
val
;
121
return
;
122
case
MISCREG_UNIQ
:
123
uniq
=
val
;
124
return
;
125
case
MISCREG_LOCKFLAG
:
126
lock_flag
=
val
;
127
return
;
128
case
MISCREG_LOCKADDR
:
129
lock_addr
=
val
;
130
return
;
131
case
MISCREG_INTR
:
132
intr_flag
=
val
;
133
return
;
134
default
:
135
assert(misc_reg <
NumInternalProcRegs
);
136
ipr
[misc_reg] =
val
;
137
return
;
138
}
139
}
140
141
void
142
ISA::setMiscReg
(
int
misc_reg,
RegVal
val
,
ThreadContext
*tc,
ThreadID
tid)
143
{
144
switch
(misc_reg) {
145
case
MISCREG_FPCR
:
146
fpcr
=
val
;
147
return
;
148
case
MISCREG_UNIQ
:
149
uniq
=
val
;
150
return
;
151
case
MISCREG_LOCKFLAG
:
152
lock_flag
=
val
;
153
return
;
154
case
MISCREG_LOCKADDR
:
155
lock_addr
=
val
;
156
return
;
157
case
MISCREG_INTR
:
158
intr_flag
=
val
;
159
return
;
160
default
:
161
setIpr
(misc_reg, val, tc);
162
return
;
163
}
164
}
165
166
}
167
168
AlphaISA::ISA
*
169
AlphaISAParams::create()
170
{
171
return
new
AlphaISA::ISA
(
this
);
172
}
logging.hh
AlphaISA::ISA::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition:
isa.cc:56
AlphaISA::MISCREG_INTR
Definition:
registers.hh:70
AlphaISA::MISCREG_FPCR
Definition:
registers.hh:66
AlphaISA::ISA::readIpr
InternalProcReg readIpr(int idx, ThreadContext *tc)
Definition:
ev5.cc:81
AlphaISA::initializeIprTable
void initializeIprTable()
Definition:
ipr.cc:129
AlphaISA::ISA::ipr
InternalProcReg ipr[NumInternalProcRegs]
Definition:
isa.hh:70
RegVal
uint64_t RegVal
Definition:
types.hh:168
cp
Definition:
cprintf.cc:42
AlphaISA::ISA::intr_flag
int intr_flag
Definition:
isa.hh:68
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Definition:
thread_context.hh:93
X86ISA::val
Bitfield< 63 > val
Definition:
misc.hh:771
isa.hh
AlphaISA::ISA::fpcr
uint64_t fpcr
Definition:
isa.hh:64
UNSERIALIZE_SCALAR
#define UNSERIALIZE_SCALAR(scalar)
Definition:
serialize.hh:645
AlphaISA::ISA::setIpr
void setIpr(int idx, InternalProcReg val, ThreadContext *tc)
Definition:
ev5.cc:190
AlphaISA::ISA::lock_addr
Addr lock_addr
Definition:
isa.hh:67
AlphaISA::ISA::readMiscReg
RegVal readMiscReg(int misc_reg, ThreadContext *tc, ThreadID tid=0)
Definition:
isa.cc:97
AlphaISA::ISA::setMiscReg
void setMiscReg(int misc_reg, RegVal val, ThreadContext *tc, ThreadID tid=0)
Definition:
isa.cc:142
AlphaISA::ISA::setMiscRegNoEffect
void setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid=0)
Definition:
isa.cc:116
AlphaISA::MISCREG_LOCKFLAG
Definition:
registers.hh:68
SERIALIZE_ARRAY
#define SERIALIZE_ARRAY(member, size)
Definition:
serialize.hh:658
CheckpointIn
Definition:
serialize.hh:72
AlphaISA::ISA::uniq
uint64_t uniq
Definition:
isa.hh:65
AlphaISA::ISA::clear
void clear()
Definition:
isa.hh:86
X86ISA::system
Bitfield< 15 > system
Definition:
misc.hh:999
SERIALIZE_SCALAR
#define SERIALIZE_SCALAR(scalar)
Definition:
serialize.hh:643
UNSERIALIZE_ARRAY
#define UNSERIALIZE_ARRAY(member, size)
Definition:
serialize.hh:661
ThreadID
int16_t ThreadID
Thread index/ID type.
Definition:
types.hh:227
thread_context.hh
AlphaISA::ISA::params
const Params * params() const
Definition:
isa.cc:50
serialize.hh
CheckpointOut
std::ostream CheckpointOut
Definition:
serialize.hh:68
AlphaISA::MISCREG_UNIQ
Definition:
registers.hh:67
SimObject::_params
const SimObjectParams * _params
Cached copy of the object parameters.
Definition:
sim_object.hh:110
AlphaISA::ISA::ISA
ISA(Params *p)
Definition:
isa.cc:43
AlphaISA::ISA::lock_flag
bool lock_flag
Definition:
isa.hh:66
AlphaISA::ISA
Definition:
isa.hh:54
AlphaISA::ISA::readMiscRegNoEffect
RegVal readMiscRegNoEffect(int misc_reg, ThreadID tid=0) const
Definition:
isa.cc:77
AlphaISA::MISCREG_LOCKADDR
Definition:
registers.hh:69
BaseISA
Definition:
isa.hh:35
AlphaISA::ISA::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition:
isa.cc:66
AlphaISA
Definition:
decoder.cc:33
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:325
AlphaISA::NumInternalProcRegs
Definition:
ipr.hh:217
AlphaISA::ISA::Params
AlphaISAParams Params
Definition:
isa.hh:58
Generated on Fri Feb 28 2020 16:26:56 for gem5 by
doxygen
1.8.13