gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
registers.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_REGISTERS_HH__
30 #define __ARCH_SPARC_REGISTERS_HH__
31 
33 #include "arch/generic/vec_reg.hh"
34 #include "arch/sparc/miscregs.hh"
36 #include "base/types.hh"
37 
38 namespace SparcISA
39 {
40 
41 // Not applicable to SPARC
48 
49 // Not applicable to SPARC
55 
56 // semantically meaningful register indices
57 enum {
58  // Globals
61  // Outputs
64  // Locals
67  // Inputs
70 
72 
82 
84 };
85 const int ZeroReg = 0; // architecturally meaningful
86 
87 // the rest of these depend on the ABI
88 const int ReturnAddressReg = INTREG_I7; // post call, precall is 15
89 const int ReturnValueReg = INTREG_O0; // Post return, 24 is pre-return.
92 
93 // Some OS syscall use a second register to return a second value
95 
96 const int NumIntRegs = (MaxGL + 1) * 8 + NWindows * 16 + NumMicroIntRegs;
97 const int NumVecRegs = 1; // Not applicable to SPARC
98  // (1 to prevent warnings)
99 const int NumVecPredRegs = 1; // Not applicable to SPARC
100  // (1 to prevent warnings)
101 const int NumCCRegs = 0;
102 
103 const int NumFloatRegs = 64;
105 
107 
108 } // namespace SparcISA
109 
110 #endif
SparcISA::INTREG_G4
@ INTREG_G4
Definition: registers.hh:60
DummyVecRegSizeBytes
constexpr size_t DummyVecRegSizeBytes
Definition: vec_reg.hh:669
SparcISA::NumFloatArchRegs
const int NumFloatArchRegs
Definition: registers.hh:104
SparcISA::INTREG_L3
@ INTREG_L3
Definition: registers.hh:65
SparcISA::FramePointerReg
const int FramePointerReg
Definition: registers.hh:91
DummyVecPredRegSizeBits
constexpr size_t DummyVecPredRegSizeBits
Definition: vec_pred_reg.hh:398
SparcISA::NumIntRegs
const int NumIntRegs
Definition: registers.hh:96
VecPredRegContainer
Generic predicate register container.
Definition: vec_pred_reg.hh:47
SparcISA::INTREG_L1
@ INTREG_L1
Definition: registers.hh:65
SparcISA::INTREG_I6
@ INTREG_I6
Definition: registers.hh:69
SparcISA::NumVecRegs
const int NumVecRegs
Definition: registers.hh:97
DummyVecPredRegHasPackedRepr
constexpr bool DummyVecPredRegHasPackedRepr
Dummy type aliases and constants for architectures that do not implement vector predicate registers.
Definition: vec_pred_reg.hh:391
SparcISA::INTREG_I0
@ INTREG_I0
Definition: registers.hh:68
SparcISA::NumIntArchRegs
@ NumIntArchRegs
Definition: registers.hh:71
SparcISA::INTREG_I4
@ INTREG_I4
Definition: registers.hh:69
SparcISA::INTREG_G1
@ INTREG_G1
Definition: registers.hh:59
SparcISA::NumFloatRegs
const int NumFloatRegs
Definition: registers.hh:103
SparcISA::INTREG_CLEANWIN
@ INTREG_CLEANWIN
Definition: registers.hh:78
SparcISA::ZeroReg
const int ZeroReg
Definition: registers.hh:85
SparcISA::TotalNumRegs
const int TotalNumRegs
Definition: registers.hh:106
SparcISA::INTREG_O6
@ INTREG_O6
Definition: registers.hh:63
SparcISA::NWindows
const int NWindows
Definition: sparc_traits.hh:41
SparcISA::INTREG_G0
@ INTREG_G0
Definition: registers.hh:59
DummyVecPredReg
VecPredRegT< DummyVecElem, DummyNumVecElemPerVecReg, DummyVecPredRegHasPackedRepr, false > DummyVecPredReg
Definition: vec_pred_reg.hh:393
SparcISA::INTREG_GSR
@ INTREG_GSR
Definition: registers.hh:81
SparcISA::NumVecPredRegs
const int NumVecPredRegs
Definition: registers.hh:99
SparcISA::INTREG_O3
@ INTREG_O3
Definition: registers.hh:62
SparcISA
Definition: asi.cc:31
SparcISA::INTREG_I2
@ INTREG_I2
Definition: registers.hh:68
SparcISA::INTREG_CANRESTORE
@ INTREG_CANRESTORE
Definition: registers.hh:77
DummyVecRegContainer
DummyVecReg::Container DummyVecRegContainer
Definition: vec_reg.hh:668
SparcISA::INTREG_O4
@ INTREG_O4
Definition: registers.hh:63
miscregs.hh
SparcISA::INTREG_WSTATE
@ INTREG_WSTATE
Definition: registers.hh:80
SparcISA::INTREG_O0
@ INTREG_O0
Definition: registers.hh:62
SparcISA::INTREG_G7
@ INTREG_G7
Definition: registers.hh:60
SparcISA::INTREG_L0
@ INTREG_L0
Definition: registers.hh:65
VecPredRegT
Predicate register view.
Definition: vec_pred_reg.hh:66
SparcISA::VecRegSizeBytes
constexpr size_t VecRegSizeBytes
Definition: registers.hh:47
SparcISA::INTREG_O5
@ INTREG_O5
Definition: registers.hh:63
SparcISA::INTREG_O1
@ INTREG_O1
Definition: registers.hh:62
DummyConstVecReg
VecRegT< DummyVecElem, DummyNumVecElemPerVecReg, true > DummyConstVecReg
Definition: vec_reg.hh:667
SparcISA::INTREG_CCR
@ INTREG_CCR
Definition: registers.hh:75
SparcISA::NumMiscRegs
const int NumMiscRegs
Definition: miscregs.hh:170
SparcISA::INTREG_CANSAVE
@ INTREG_CANSAVE
Definition: registers.hh:76
SparcISA::INTREG_UREG0
@ INTREG_UREG0
Definition: registers.hh:73
SparcISA::VecPredRegSizeBits
constexpr size_t VecPredRegSizeBits
Definition: registers.hh:53
DummyVecElem
uint32_t DummyVecElem
Dummy type aliases and constants for architectures that do not implement vector registers.
Definition: vec_reg.hh:664
SparcISA::MaxGL
const int MaxGL
Definition: sparc_traits.hh:37
vec_pred_reg.hh
DummyVecReg
VecRegT< DummyVecElem, DummyNumVecElemPerVecReg, false > DummyVecReg
Definition: vec_reg.hh:666
DummyVecPredRegContainer
DummyVecPredReg::Container DummyVecPredRegContainer
Definition: vec_pred_reg.hh:397
SparcISA::NumVecElemPerVecReg
constexpr unsigned NumVecElemPerVecReg
Definition: registers.hh:46
SparcISA::VecElem
::DummyVecElem VecElem
Definition: registers.hh:42
SparcISA::INTREG_O2
@ INTREG_O2
Definition: registers.hh:62
vec_reg.hh
SparcISA::INTREG_G5
@ INTREG_G5
Definition: registers.hh:60
SparcISA::ReturnAddressReg
const int ReturnAddressReg
Definition: registers.hh:88
DummyConstVecPredReg
VecPredRegT< DummyVecElem, DummyNumVecElemPerVecReg, DummyVecPredRegHasPackedRepr, true > DummyConstVecPredReg
Definition: vec_pred_reg.hh:396
types.hh
SparcISA::INTREG_G2
@ INTREG_G2
Definition: registers.hh:59
SparcISA::INTREG_G3
@ INTREG_G3
Definition: registers.hh:59
SparcISA::VecPredRegHasPackedRepr
constexpr bool VecPredRegHasPackedRepr
Definition: registers.hh:54
SparcISA::INTREG_L7
@ INTREG_L7
Definition: registers.hh:66
DummyNumVecElemPerVecReg
constexpr unsigned DummyNumVecElemPerVecReg
Definition: vec_reg.hh:665
SparcISA::INTREG_I1
@ INTREG_I1
Definition: registers.hh:68
SparcISA::ReturnValueReg
const int ReturnValueReg
Definition: registers.hh:89
SparcISA::INTREG_L2
@ INTREG_L2
Definition: registers.hh:65
SparcISA::INTREG_Y
@ INTREG_Y
Definition: registers.hh:74
SparcISA::INTREG_L6
@ INTREG_L6
Definition: registers.hh:66
SparcISA::INTREG_I7
@ INTREG_I7
Definition: registers.hh:69
SparcISA::INTREG_G6
@ INTREG_G6
Definition: registers.hh:60
SparcISA::NumMicroIntRegs
@ NumMicroIntRegs
Definition: registers.hh:83
SparcISA::NumCCRegs
const int NumCCRegs
Definition: registers.hh:101
SparcISA::INTREG_O7
@ INTREG_O7
Definition: registers.hh:63
SparcISA::SyscallPseudoReturnReg
const int SyscallPseudoReturnReg
Definition: registers.hh:94
SparcISA::INTREG_OTHERWIN
@ INTREG_OTHERWIN
Definition: registers.hh:79
SparcISA::INTREG_I5
@ INTREG_I5
Definition: registers.hh:69
sparc_traits.hh
SparcISA::INTREG_I3
@ INTREG_I3
Definition: registers.hh:68
SparcISA::INTREG_L5
@ INTREG_L5
Definition: registers.hh:66
SparcISA::INTREG_L4
@ INTREG_L4
Definition: registers.hh:66
VecRegContainer
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
Definition: vec_reg.hh:156
VecRegT
Vector Register Abstraction This generic class is a view in a particularization of MVC,...
Definition: vec_reg.hh:170
SparcISA::StackPointerReg
const int StackPointerReg
Definition: registers.hh:90

Generated on Tue Mar 23 2021 19:41:20 for gem5 by doxygen 1.8.17