gem5
v21.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
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
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
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
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
l
m
n
o
p
r
s
t
u
v
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
_
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
k
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
x86
types.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 Advanced Micro Devices, Inc.
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
29
#include "
arch/x86/types.hh
"
30
31
#include "
sim/serialize.hh
"
32
33
using namespace
X86ISA
;
34
35
template
<>
36
void
37
paramOut
(
CheckpointOut
&
cp
,
const
std::string &
name
,
38
ExtMachInst
const
&machInst)
39
{
40
// Prefixes
41
paramOut
(
cp
,
name
+
".legacy"
, (uint8_t)machInst.
legacy
);
42
paramOut
(
cp
,
name
+
".rex"
, (uint8_t)machInst.
rex
);
43
paramOut
(
cp
,
name
+
".vex"
, (uint32_t)machInst.
vex
);
44
45
// Opcode
46
paramOut
(
cp
,
name
+
".opcode.type"
, (uint8_t)machInst.
opcode
.
type
);
47
paramOut
(
cp
,
name
+
".opcode.op"
, (uint8_t)machInst.
opcode
.
op
);
48
49
// Modifier bytes
50
paramOut
(
cp
,
name
+
".modRM"
, (uint8_t)machInst.
modRM
);
51
paramOut
(
cp
,
name
+
".sib"
, (uint8_t)machInst.
sib
);
52
53
// Immediate fields
54
paramOut
(
cp
,
name
+
".immediate"
, machInst.
immediate
);
55
paramOut
(
cp
,
name
+
".displacement"
, machInst.
displacement
);
56
57
// Sizes
58
paramOut
(
cp
,
name
+
".opSize"
, machInst.
opSize
);
59
paramOut
(
cp
,
name
+
".addrSize"
, machInst.
addrSize
);
60
paramOut
(
cp
,
name
+
".stackSize"
, machInst.
stackSize
);
61
paramOut
(
cp
,
name
+
".dispSize"
, machInst.
dispSize
);
62
63
// Mode
64
paramOut
(
cp
,
name
+
".mode"
, (uint8_t)machInst.
mode
);
65
}
66
67
template
<>
68
void
69
paramIn
(
CheckpointIn
&
cp
,
const
std::string &
name
,
ExtMachInst
&machInst)
70
{
71
uint8_t temp8;
72
// Prefixes
73
paramIn
(
cp
,
name
+
".legacy"
, temp8);
74
machInst.
legacy
= temp8;
75
paramIn
(
cp
,
name
+
".rex"
, temp8);
76
machInst.
rex
= temp8;
77
78
uint32_t temp32;
79
paramIn
(
cp
,
name
+
".vex"
, temp32);
80
machInst.
vex
= temp32;
81
82
// Opcode
83
paramIn
(
cp
,
name
+
".opcode.type"
, temp8);
84
machInst.
opcode
.
type
= (OpcodeType)temp8;
85
paramIn
(
cp
,
name
+
".opcode.op"
, temp8);
86
machInst.
opcode
.
op
= temp8;
87
88
// Modifier bytes
89
paramIn
(
cp
,
name
+
".modRM"
, temp8);
90
machInst.
modRM
= temp8;
91
paramIn
(
cp
,
name
+
".sib"
, temp8);
92
machInst.
sib
= temp8;;
93
94
// Immediate fields
95
paramIn
(
cp
,
name
+
".immediate"
, machInst.
immediate
);
96
paramIn
(
cp
,
name
+
".displacement"
, machInst.
displacement
);
97
98
// Sizes
99
paramIn
(
cp
,
name
+
".opSize"
, machInst.
opSize
);
100
paramIn
(
cp
,
name
+
".addrSize"
, machInst.
addrSize
);
101
paramIn
(
cp
,
name
+
".stackSize"
, machInst.
stackSize
);
102
paramIn
(
cp
,
name
+
".dispSize"
, machInst.
dispSize
);
103
104
// Mode
105
paramIn
(
cp
,
name
+
".mode"
, temp8);
106
machInst.
mode
= temp8;
107
}
X86ISA::ExtMachInst::mode
OperatingMode mode
Definition:
types.hh:232
serialize.hh
X86ISA::ExtMachInst::op
Opcode op
Definition:
types.hh:213
X86ISA::ExtMachInst::immediate
uint64_t immediate
Definition:
types.hh:219
X86ISA::ExtMachInst::displacement
uint64_t displacement
Definition:
types.hh:220
cp
Definition:
cprintf.cc:37
X86ISA::ExtMachInst::opSize
uint8_t opSize
Definition:
types.hh:223
X86ISA::ExtMachInst::opcode
struct X86ISA::ExtMachInst::@20 opcode
X86ISA::ExtMachInst::addrSize
uint8_t addrSize
Definition:
types.hh:225
X86ISA::ExtMachInst
Definition:
types.hh:199
X86ISA
This is exposed globally, independent of the ISA.
Definition:
acpi.hh:55
X86ISA::ExtMachInst::modRM
ModRM modRM
Definition:
types.hh:216
name
const std::string & name()
Definition:
trace.cc:48
paramOut
void paramOut(CheckpointOut &cp, const std::string &name, ExtMachInst const &machInst)
Definition:
types.cc:37
X86ISA::ExtMachInst::stackSize
uint8_t stackSize
Definition:
types.hh:227
X86ISA::ExtMachInst::type
OpcodeType type
Definition:
types.hh:211
X86ISA::ExtMachInst::rex
Rex rex
Definition:
types.hh:205
X86ISA::ExtMachInst::sib
Sib sib
Definition:
types.hh:217
X86ISA::ExtMachInst::vex
VexInfo vex
Definition:
types.hh:206
X86ISA::ExtMachInst::dispSize
uint8_t dispSize
Definition:
types.hh:229
CheckpointOut
std::ostream CheckpointOut
Definition:
serialize.hh:64
X86ISA::ExtMachInst::legacy
LegacyPrefixVector legacy
Definition:
types.hh:204
paramIn
void paramIn(CheckpointIn &cp, const std::string &name, ExtMachInst &machInst)
Definition:
types.cc:69
CheckpointIn
Definition:
serialize.hh:68
types.hh
Generated on Tue Mar 23 2021 19:41:23 for gem5 by
doxygen
1.8.17