gem5 v24.0.0.0
Loading...
Searching...
No Matches
misc.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer;
10 * redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution;
13 * neither the name of the copyright holders nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#ifndef __ARCH_MIPS_REGS_MISC_HH__
31#define __ARCH_MIPS_REGS_MISC_HH__
32
33#include "cpu/reg_class.hh"
34#include "debug/MiscRegs.hh"
35
36namespace gem5
37{
38namespace MipsISA
39{
40namespace misc_reg
41{
42
43// Enumerate names for 'Control' Registers in the CPU
44// Reference MIPS32 Arch. for Programmers, Vol. III, Ch.8
45// (Register Number-Register Select) Summary of Register
46//------------------------------------------------------
47// The first set of names classify the CP0 names as Register Banks
48// for easy indexing when using the 'RD + SEL' index combination
49// in CP0 instructions.
50enum : RegIndex
51{
52 Index = 0, //Bank 0: 0 - 3
56
57 Cp0Random = 8, //Bank 1: 8 - 15
65
66 Entrylo0 = 16, //Bank 2: 16 - 23
74
75 Entrylo1 = 24, // Bank 3: 24
76
77 Context = 32, // Bank 4: 32 - 33
79
80 Pagemask = 40, //Bank 5: 40 - 41
82
83 Wired = 48, //Bank 6:48-55
89
90 Hwrena = 56, //Bank 7: 56-63
91
92 Badvaddr = 64, //Bank 8: 64-71
93
94 Count = 72, //Bank 9: 72-79
95
96 Entryhi = 80, //Bank 10: 80-87
97
98 Compare = 88, //Bank 11: 88-95
99
100 Status = 96, //Bank 12: 96-103
104
105 Cause = 104, //Bank 13: 104-111
106
107 Epc = 112, //Bank 14: 112-119
108
109 Prid = 120, //Bank 15: 120-127,
111
112 Config = 128, //Bank 16: 128-135
120
121
122 Lladdr = 136, //Bank 17: 136-143
123
124 Watchlo0 = 144, //Bank 18: 144-151
132
133 Watchhi0 = 152, //Bank 19: 152-159
141
142 Xccontext64 = 160, //Bank 20: 160-167
143
144 //Bank 21: 168-175
145
146 //Bank 22: 176-183
147
148 Debug = 184, //Bank 23: 184-191
153
154 Depc = 192, //Bank 24: 192-199
155
156 Perfcnt0 = 200, //Bank 25: 200-207
164
165 Errctl = 208, //Bank 26: 208-215
166
167 Cacheerr0 = 216, //Bank 27: 216-223
171
172 Taglo0 = 224, //Bank 28: 224-231
180
181 Taghi0 = 232, //Bank 29: 232-239
189
190
191 ErrorEpc = 240, //Bank 30: 240-247
192
193 Desave = 248, //Bank 31: 248-256
194
195 Llflag = 257,
197
198 NumRegs
200
201} // namespace misc_reg
202
204 misc_reg::NumRegs, debug::MiscRegs);
205
206} // namespace MipsISA
207} // namespace gem5
208
209#endif
constexpr RegClass miscRegClass
Definition misc.hh:2937
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint16_t RegIndex
Definition types.hh:176
constexpr char MiscRegClassName[]
Definition reg_class.hh:82
@ MiscRegClass
Control (misc) register.
Definition reg_class.hh:70

Generated on Tue Jun 18 2024 16:24:04 for gem5 by doxygen 1.11.0