gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
miscregs.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2005 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 
29 #ifndef __ARCH_SPARC_MISCREGS_HH__
30 #define __ARCH_SPARC_MISCREGS_HH__
31 
32 #include "base/bitunion.hh"
33 #include "base/types.hh"
34 
35 namespace SparcISA
36 {
38 {
40 // MISCREG_Y,
41 // MISCREG_CCR,
50  MISCREG_SOFTINT, /* 10 */
54 
62  MISCREG_PSTATE, /* 20 */
66 // MISCREG_CANSAVE,
67 // MISCREG_CANRESTORE,
68 // MISCREG_CLEANWIN,
69 // MISCREG_OTHERWIN,
70 // MISCREG_WSTATE,
72 
74  MISCREG_HPSTATE, /* 30 */
81 
84 
90 
100 
101  /* CPU Queue Registers */
110 
111  /* All the data for the TLB packed up in one register. */
114 };
115 
116 BitUnion64(HPSTATE)
117  Bitfield<0> tlz;
118  Bitfield<2> hpriv;
119  Bitfield<5> red;
120  Bitfield<10> ibe;
121  Bitfield<11> id; // this impl. dependent (id) field m
122 EndBitUnion(HPSTATE)
123 
124 BitUnion16(PSTATE)
125  Bitfield<1> ie;
126  Bitfield<2> priv;
127  Bitfield<3> am;
128  Bitfield<4> pef;
129  Bitfield<7, 6> mm;
130  Bitfield<8> tle;
131  Bitfield<9> cle;
132  Bitfield<10> pid0;
133  Bitfield<11> pid1;
134 EndBitUnion(PSTATE)
135 
136 BitUnion8(CCR)
137  SubBitUnion(xcc, 7, 4)
138  Bitfield<7> n;
139  Bitfield<6> z;
140  Bitfield<5> v;
141  Bitfield<4> c;
142  EndSubBitUnion(xcc)
143  SubBitUnion(icc, 3, 0)
144  Bitfield<3> n;
145  Bitfield<2> z;
146  Bitfield<1> v;
147  Bitfield<0> c;
149 EndBitUnion(CCR)
150 
151 struct STS
152 {
153  const static int st_idle = 0x00;
154  const static int st_wait = 0x01;
155  const static int st_halt = 0x02;
156  const static int st_run = 0x05;
157  const static int st_spec_run = 0x07;
158  const static int st_spec_rdy = 0x13;
159  const static int st_ready = 0x19;
160  const static int active = 0x01;
161  const static int speculative = 0x04;
162  const static int shft_id = 8;
163  const static int shft_fsm0 = 31;
164  const static int shft_fsm1 = 26;
165  const static int shft_fsm2 = 21;
166  const static int shft_fsm3 = 16;
167 };
168 
169 
171 
172 }
173 
174 #endif
Bitfield< 0 > ie
const int NumMiscRegs
Definition: miscregs.hh:170
Bitfield< 5 > v
Definition: miscregs.hh:140
Bitfield< 3 > am
Definition: miscregs.hh:127
EndSubBitUnion(xcc) SubBitUnion(icc
MMU Internal Registers.
Definition: miscregs.hh:86
MiscRegIndex
Definition: miscregs.hh:37
#define SubBitUnion(name, first, last)
Definition: bitunion.hh:362
Bitfield< 2 > hpriv
Definition: miscregs.hh:118
Hyper privileged registers.
Definition: miscregs.hh:74
EndBitUnion(HPSTATE) BitUnion16(PSTATE) Bitfield< 1 > ie
Bitfield< 7 > n
Definition: miscregs.hh:137
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
#define BitUnion16(name)
Definition: bitunion.hh:376
Ancillary State Registers.
Definition: miscregs.hh:42
#define BitUnion8(name)
Definition: bitunion.hh:377
Bitfield< 4 > c
Definition: miscregs.hh:141
Bitfield< 6 > z
Definition: miscregs.hh:139
Definition: asi.cc:31
Privilged Registers.
Definition: miscregs.hh:56
Scratchpad regiscers.
Definition: miscregs.hh:92
Bitfield< 10 > ibe
Definition: miscregs.hh:120
Bitfield< 4 > pef
Definition: miscregs.hh:128
BitUnion64(HPSTATE) Bitfield< 0 > tlz
Bitfield< 5 > red
Definition: miscregs.hh:119
Bitfield< 2 > priv
Definition: miscregs.hh:126
Bitfield< 7, 6 > mm
Definition: miscregs.hh:129
Bitfield< 9 > cle
Definition: miscregs.hh:131
Bitfield< 11 > id
Definition: miscregs.hh:121
Bitfield< 10 > pid0
Definition: miscregs.hh:132
Bitfield< 11 > pid1
Definition: miscregs.hh:133
Bitfield< 8 > tle
Definition: miscregs.hh:130
Floating Point Status Register.
Definition: miscregs.hh:83

Generated on Mon Jun 8 2020 15:34:40 for gem5 by doxygen 1.8.13