gem5 v24.0.0.0
Loading...
Searching...
No Matches
int.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_REGS_INT_HH__
30#define __ARCH_SPARC_REGS_INT_HH__
31
33#include "cpu/reg_class.hh"
34#include "debug/IntRegs.hh"
35
36namespace gem5
37{
38
39namespace SparcISA
40{
41
70
72{
73 RegId flatten(const BaseISA &isa, const RegId &id) const override;
74};
75
77
78inline constexpr RegClass intRegClass =
80 ops(intRegClassOps).
81 needsFlattening();
82
83inline constexpr RegClass flatIntRegClass =
85
86namespace int_reg
87{
88
89inline constexpr RegId
90 // Globals
99
100 // Outputs
109
110 // Locals
119
120 // Inputs
129
139
140inline constexpr RegId
142{
143 return intRegClass[G0 + index];
144}
145
146inline constexpr RegId
148{
149 return intRegClass[O0 + index];
150}
151
152inline constexpr RegId
154{
155 return intRegClass[L0 + index];
156}
157
158inline constexpr RegId
160{
161 return intRegClass[I0 + index];
162}
163
164} // namespace int_reg
165
166// the rest of these depend on the ABI
167inline constexpr auto
168 &ReturnAddressReg = int_reg::I7, // post call, precall is 15
169 &ReturnValueReg = int_reg::O0, // Post return, 24 is pre-return.
172
173 // Some OS syscall use a second register to return a second value
175
176} // namespace SparcISA
177} // namespace gem5
178
179#endif
Register ID: describe an architectural register with its class and index.
Definition reg_class.hh:94
RegId flatten(const BaseISA &isa, const RegId &id) const override
Flatten register id id using information in the ISA object isa.
Definition int.cc:40
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 5 > l
Bitfield< 30, 0 > index
Bitfield< 4 > g
constexpr RegId Cleanwin
Definition int.hh:135
constexpr RegId L6
Definition int.hh:117
constexpr RegId G0
Definition int.hh:91
constexpr RegId O5
Definition int.hh:106
constexpr RegId O7
Definition int.hh:108
constexpr RegId I7
Definition int.hh:128
constexpr RegId I1
Definition int.hh:122
constexpr RegId O6
Definition int.hh:107
constexpr RegId Ureg0
Definition int.hh:130
constexpr RegId L4
Definition int.hh:115
constexpr RegId G7
Definition int.hh:98
constexpr RegId Wstate
Definition int.hh:137
constexpr RegId L2
Definition int.hh:113
constexpr RegId I4
Definition int.hh:125
constexpr RegId O1
Definition int.hh:102
constexpr RegId L1
Definition int.hh:112
constexpr RegId I0
Definition int.hh:121
constexpr RegId O0
Definition int.hh:101
constexpr RegId Y
Definition int.hh:131
constexpr RegId L0
Definition int.hh:111
constexpr RegId O4
Definition int.hh:105
constexpr RegId I6
Definition int.hh:127
constexpr RegId L7
Definition int.hh:118
constexpr RegId Gsr
Definition int.hh:138
constexpr RegId O3
Definition int.hh:104
constexpr RegId G3
Definition int.hh:94
constexpr RegId G6
Definition int.hh:97
constexpr RegId G1
Definition int.hh:92
constexpr RegId I5
Definition int.hh:126
constexpr RegId G5
Definition int.hh:96
constexpr RegId Ccr
Definition int.hh:132
constexpr RegId G2
Definition int.hh:93
constexpr RegId L5
Definition int.hh:116
constexpr RegId I3
Definition int.hh:124
constexpr RegId Cansave
Definition int.hh:133
constexpr RegId Otherwin
Definition int.hh:136
constexpr RegId G4
Definition int.hh:95
constexpr RegId o(int index)
Definition int.hh:147
const int NumRegs
Definition int.hh:67
constexpr RegId L3
Definition int.hh:114
constexpr RegId Canrestore
Definition int.hh:134
constexpr RegId I2
Definition int.hh:123
constexpr RegId O2
Definition int.hh:103
constexpr RegClass flatIntRegClass
Definition int.hh:83
constexpr RegClass intRegClass
Definition int.hh:78
constexpr auto & StackPointerReg
Definition int.hh:170
const int NWindows
constexpr auto & ReturnAddressReg
Definition int.hh:168
constexpr IntRegClassOps intRegClassOps
Definition int.hh:76
constexpr auto & FramePointerReg
Definition int.hh:171
constexpr auto & SyscallPseudoReturnReg
Definition int.hh:174
const int MaxGL
constexpr auto & ReturnValueReg
Definition int.hh:169
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
constexpr char IntRegClassName[]
Definition reg_class.hh:75
@ IntRegClass
Integer register.
Definition reg_class.hh:61

Generated on Tue Jun 18 2024 16:23:59 for gem5 by doxygen 1.11.0