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
x86
regs
float.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 The Hewlett-Packard Development Company
3
* All rights reserved.
4
*
5
* The license below extends only to copyright in the software and shall
6
* not be construed as granting a license to any other intellectual
7
* property including but not limited to intellectual property relating
8
* to a hardware implementation of the functionality of the software
9
* licensed hereunder. You may use the software subject to the license
10
* terms below provided that you ensure that this notice is replicated
11
* unmodified and in its entirety in all distributions of the software,
12
* modified or unmodified, in source code or in binary form.
13
*
14
* Redistribution and use in source and binary forms, with or without
15
* modification, are permitted provided that the following conditions are
16
* met: redistributions of source code must retain the above copyright
17
* notice, this list of conditions and the following disclaimer;
18
* redistributions in binary form must reproduce the above copyright
19
* notice, this list of conditions and the following disclaimer in the
20
* documentation and/or other materials provided with the distribution;
21
* neither the name of the copyright holders nor the names of its
22
* contributors may be used to endorse or promote products derived from
23
* this software without specific prior written permission.
24
*
25
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
*
37
* Authors: Gabe Black
38
*/
39
40
#ifndef __ARCH_X86_FLOATREGS_HH__
41
#define __ARCH_X86_FLOATREGS_HH__
42
43
#include "
arch/x86/x86_traits.hh
"
44
#include "
base/bitunion.hh
"
45
46
namespace
X86ISA
47
{
48
enum
FloatRegIndex
49
{
50
// MMX/X87 registers
51
FLOATREG_MMX_BASE
,
52
FLOATREG_FPR_BASE
=
FLOATREG_MMX_BASE
,
53
FLOATREG_MMX0
=
FLOATREG_MMX_BASE
,
54
FLOATREG_MMX1
,
55
FLOATREG_MMX2
,
56
FLOATREG_MMX3
,
57
FLOATREG_MMX4
,
58
FLOATREG_MMX5
,
59
FLOATREG_MMX6
,
60
FLOATREG_MMX7
,
61
62
FLOATREG_FPR0
=
FLOATREG_FPR_BASE
,
63
FLOATREG_FPR1
,
64
FLOATREG_FPR2
,
65
FLOATREG_FPR3
,
66
FLOATREG_FPR4
,
67
FLOATREG_FPR5
,
68
FLOATREG_FPR6
,
69
FLOATREG_FPR7
,
70
71
FLOATREG_XMM_BASE
=
FLOATREG_MMX_BASE
+
NumMMXRegs
,
72
FLOATREG_XMM0_LOW
=
FLOATREG_XMM_BASE
,
73
FLOATREG_XMM0_HIGH
,
74
FLOATREG_XMM1_LOW
,
75
FLOATREG_XMM1_HIGH
,
76
FLOATREG_XMM2_LOW
,
77
FLOATREG_XMM2_HIGH
,
78
FLOATREG_XMM3_LOW
,
79
FLOATREG_XMM3_HIGH
,
80
FLOATREG_XMM4_LOW
,
81
FLOATREG_XMM4_HIGH
,
82
FLOATREG_XMM5_LOW
,
83
FLOATREG_XMM5_HIGH
,
84
FLOATREG_XMM6_LOW
,
85
FLOATREG_XMM6_HIGH
,
86
FLOATREG_XMM7_LOW
,
87
FLOATREG_XMM7_HIGH
,
88
FLOATREG_XMM8_LOW
,
89
FLOATREG_XMM8_HIGH
,
90
FLOATREG_XMM9_LOW
,
91
FLOATREG_XMM9_HIGH
,
92
FLOATREG_XMM10_LOW
,
93
FLOATREG_XMM10_HIGH
,
94
FLOATREG_XMM11_LOW
,
95
FLOATREG_XMM11_HIGH
,
96
FLOATREG_XMM12_LOW
,
97
FLOATREG_XMM12_HIGH
,
98
FLOATREG_XMM13_LOW
,
99
FLOATREG_XMM13_HIGH
,
100
FLOATREG_XMM14_LOW
,
101
FLOATREG_XMM14_HIGH
,
102
FLOATREG_XMM15_LOW
,
103
FLOATREG_XMM15_HIGH
,
104
105
FLOATREG_MICROFP_BASE
=
FLOATREG_XMM_BASE
+ 2 *
NumXMMRegs
,
106
FLOATREG_MICROFP0
=
FLOATREG_MICROFP_BASE
,
107
FLOATREG_MICROFP1
,
108
FLOATREG_MICROFP2
,
109
FLOATREG_MICROFP3
,
110
FLOATREG_MICROFP4
,
111
FLOATREG_MICROFP5
,
112
FLOATREG_MICROFP6
,
113
FLOATREG_MICROFP7
,
114
115
NUM_FLOATREGS
=
FLOATREG_MICROFP_BASE
+
NumMicroFpRegs
116
};
117
118
static
inline
FloatRegIndex
119
FLOATREG_MMX
(
int
index
)
120
{
121
return
(
FloatRegIndex
)(
FLOATREG_MMX_BASE
+
index
);
122
}
123
124
static
inline
FloatRegIndex
125
FLOATREG_FPR
(
int
index
)
126
{
127
return
(
FloatRegIndex
)(
FLOATREG_FPR_BASE
+
index
);
128
}
129
130
static
inline
FloatRegIndex
131
FLOATREG_XMM_LOW
(
int
index
)
132
{
133
return
(
FloatRegIndex
)(
FLOATREG_XMM_BASE
+ 2 *
index
);
134
}
135
136
static
inline
FloatRegIndex
137
FLOATREG_XMM_HIGH
(
int
index
)
138
{
139
return
(
FloatRegIndex
)(
FLOATREG_XMM_BASE
+ 2 * index + 1);
140
}
141
142
static
inline
FloatRegIndex
143
FLOATREG_MICROFP
(
int
index
)
144
{
145
return
(
FloatRegIndex
)(
FLOATREG_MICROFP_BASE
+
index
);
146
}
147
148
static
inline
FloatRegIndex
149
FLOATREG_STACK
(
int
index
,
int
top)
150
{
151
return
FLOATREG_FPR
((top + index + 8) % 8);
152
}
153
}
154
155
#endif // __ARCH_X86_FLOATREGS_HH__
X86ISA::FLOATREG_XMM0_HIGH
Definition:
float.hh:73
X86ISA::FLOATREG_FPR3
Definition:
float.hh:65
X86ISA::index
Bitfield< 5, 3 > index
Definition:
types.hh:95
X86ISA::FLOATREG_MMX
static FloatRegIndex FLOATREG_MMX(int index)
Definition:
float.hh:119
X86ISA::FLOATREG_FPR2
Definition:
float.hh:64
X86ISA::FLOATREG_FPR0
Definition:
float.hh:62
X86ISA::FLOATREG_MICROFP1
Definition:
float.hh:107
X86ISA::FLOATREG_MMX4
Definition:
float.hh:57
X86ISA::FLOATREG_MICROFP5
Definition:
float.hh:111
X86ISA::NumMicroFpRegs
const int NumMicroFpRegs
Definition:
x86_traits.hh:59
X86ISA::FLOATREG_XMM2_LOW
Definition:
float.hh:76
X86ISA::FLOATREG_XMM2_HIGH
Definition:
float.hh:77
X86ISA::FLOATREG_MICROFP7
Definition:
float.hh:113
X86ISA::FLOATREG_XMM4_LOW
Definition:
float.hh:80
X86ISA::FLOATREG_XMM10_HIGH
Definition:
float.hh:93
X86ISA::FLOATREG_MMX5
Definition:
float.hh:58
X86ISA::FLOATREG_XMM13_HIGH
Definition:
float.hh:99
X86ISA::FLOATREG_FPR5
Definition:
float.hh:67
X86ISA::FLOATREG_XMM0_LOW
Definition:
float.hh:72
X86ISA::NumMMXRegs
const int NumMMXRegs
Definition:
x86_traits.hh:57
X86ISA::FLOATREG_MICROFP_BASE
Definition:
float.hh:105
X86ISA::NumXMMRegs
const int NumXMMRegs
Definition:
x86_traits.hh:58
x86_traits.hh
X86ISA::FLOATREG_XMM12_HIGH
Definition:
float.hh:97
X86ISA::FLOATREG_XMM9_LOW
Definition:
float.hh:90
X86ISA::FLOATREG_FPR
static FloatRegIndex FLOATREG_FPR(int index)
Definition:
float.hh:125
X86ISA::FLOATREG_MMX7
Definition:
float.hh:60
X86ISA::FLOATREG_XMM_HIGH
static FloatRegIndex FLOATREG_XMM_HIGH(int index)
Definition:
float.hh:137
X86ISA::FLOATREG_FPR7
Definition:
float.hh:69
X86ISA::FLOATREG_XMM7_HIGH
Definition:
float.hh:87
X86ISA::FLOATREG_MMX1
Definition:
float.hh:54
X86ISA::FLOATREG_XMM7_LOW
Definition:
float.hh:86
X86ISA::FLOATREG_XMM4_HIGH
Definition:
float.hh:81
X86ISA::FLOATREG_MMX_BASE
Definition:
float.hh:51
X86ISA::FLOATREG_STACK
static FloatRegIndex FLOATREG_STACK(int index, int top)
Definition:
float.hh:149
X86ISA::FloatRegIndex
FloatRegIndex
Definition:
float.hh:48
X86ISA::FLOATREG_XMM6_HIGH
Definition:
float.hh:85
X86ISA::FLOATREG_MMX6
Definition:
float.hh:59
X86ISA::FLOATREG_XMM12_LOW
Definition:
float.hh:96
X86ISA::FLOATREG_MICROFP
static FloatRegIndex FLOATREG_MICROFP(int index)
Definition:
float.hh:143
X86ISA::FLOATREG_XMM3_LOW
Definition:
float.hh:78
X86ISA::FLOATREG_XMM1_HIGH
Definition:
float.hh:75
X86ISA::FLOATREG_FPR1
Definition:
float.hh:63
X86ISA::FLOATREG_XMM11_HIGH
Definition:
float.hh:95
X86ISA::FLOATREG_XMM_LOW
static FloatRegIndex FLOATREG_XMM_LOW(int index)
Definition:
float.hh:131
X86ISA::FLOATREG_XMM8_LOW
Definition:
float.hh:88
X86ISA::FLOATREG_MICROFP0
Definition:
float.hh:106
X86ISA::FLOATREG_MMX0
Definition:
float.hh:53
X86ISA::FLOATREG_XMM13_LOW
Definition:
float.hh:98
bitunion.hh
X86ISA::FLOATREG_MICROFP3
Definition:
float.hh:109
X86ISA::FLOATREG_XMM15_HIGH
Definition:
float.hh:103
X86ISA::NUM_FLOATREGS
Definition:
float.hh:115
X86ISA::FLOATREG_XMM8_HIGH
Definition:
float.hh:89
X86ISA::FLOATREG_FPR6
Definition:
float.hh:68
X86ISA::FLOATREG_XMM14_LOW
Definition:
float.hh:100
X86ISA::FLOATREG_FPR4
Definition:
float.hh:66
X86ISA::FLOATREG_XMM3_HIGH
Definition:
float.hh:79
X86ISA::FLOATREG_MICROFP4
Definition:
float.hh:110
X86ISA::FLOATREG_XMM1_LOW
Definition:
float.hh:74
X86ISA::FLOATREG_XMM14_HIGH
Definition:
float.hh:101
X86ISA::FLOATREG_MMX3
Definition:
float.hh:56
X86ISA::FLOATREG_XMM11_LOW
Definition:
float.hh:94
X86ISA::FLOATREG_MMX2
Definition:
float.hh:55
X86ISA::FLOATREG_XMM5_HIGH
Definition:
float.hh:83
X86ISA::FLOATREG_FPR_BASE
Definition:
float.hh:52
X86ISA::FLOATREG_XMM5_LOW
Definition:
float.hh:82
X86ISA::FLOATREG_XMM15_LOW
Definition:
float.hh:102
X86ISA::FLOATREG_MICROFP2
Definition:
float.hh:108
X86ISA::FLOATREG_XMM_BASE
Definition:
float.hh:71
X86ISA::FLOATREG_XMM10_LOW
Definition:
float.hh:92
X86ISA::FLOATREG_XMM9_HIGH
Definition:
float.hh:91
X86ISA::FLOATREG_MICROFP6
Definition:
float.hh:112
X86ISA::FLOATREG_XMM6_LOW
Definition:
float.hh:84
Generated on Fri Jun 9 2017 13:03:40 for gem5 by
doxygen
1.8.6