gem5  v20.1.0.0
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/generated/max_inst_regs.hh"
35 #include "arch/sparc/miscregs.hh"
37 #include "base/types.hh"
38 
39 namespace SparcISA
40 {
41 
43 using SparcISAInst::MaxInstDestRegs;
45 
46 // Not applicable to SPARC
53 
54 // Not applicable to SPARC
60 
61 // semantically meaningful register indices
62 enum {
63  // Globals
66  // Outputs
69  // Locals
72  // Inputs
75 
77 
87 
89 };
90 const int ZeroReg = 0; // architecturally meaningful
91 
92 // the rest of these depend on the ABI
93 const int ReturnAddressReg = INTREG_I7; // post call, precall is 15
94 const int ReturnValueReg = INTREG_O0; // Post return, 24 is pre-return.
97 
98 // Some OS syscall use a second register to return a second value
100 
101 const int NumIntRegs = (MaxGL + 1) * 8 + NWindows * 16 + NumMicroIntRegs;
102 const int NumVecRegs = 1; // Not applicable to SPARC
103  // (1 to prevent warnings)
104 const int NumVecPredRegs = 1; // Not applicable to SPARC
105  // (1 to prevent warnings)
106 const int NumCCRegs = 0;
107 
108 const int NumFloatRegs = 64;
110 
112 
113 } // namespace SparcISA
114 
115 #endif
DummyVecRegSizeBytes
constexpr size_t DummyVecRegSizeBytes
Definition: vec_reg.hh:669
SparcISA::INTREG_O0
@ INTREG_O0
Definition: registers.hh:67
SparcISA::NumFloatArchRegs
const int NumFloatArchRegs
Definition: registers.hh:109
SparcISA::FramePointerReg
const int FramePointerReg
Definition: registers.hh:96
DummyVecPredRegSizeBits
constexpr size_t DummyVecPredRegSizeBits
Definition: vec_pred_reg.hh:398
SparcISA::NumIntRegs
const int NumIntRegs
Definition: registers.hh:101
VecPredRegContainer
Generic predicate register container.
Definition: vec_pred_reg.hh:47
SparcISA::INTREG_I7
@ INTREG_I7
Definition: registers.hh:74
SparcISA::INTREG_G7
@ INTREG_G7
Definition: registers.hh:65
SparcISA::NumVecRegs
const int NumVecRegs
Definition: registers.hh:102
SparcISA::INTREG_I6
@ INTREG_I6
Definition: registers.hh:74
SparcISA::NumIntArchRegs
@ NumIntArchRegs
Definition: registers.hh:76
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_G2
@ INTREG_G2
Definition: registers.hh:64
SparcISA::INTREG_I3
@ INTREG_I3
Definition: registers.hh:73
SparcISA::INTREG_CLEANWIN
@ INTREG_CLEANWIN
Definition: registers.hh:83
SparcISA::INTREG_CCR
@ INTREG_CCR
Definition: registers.hh:80
SparcISA::NumFloatRegs
const int NumFloatRegs
Definition: registers.hh:108
SparcISA::INTREG_L1
@ INTREG_L1
Definition: registers.hh:70
SparcISA::INTREG_O3
@ INTREG_O3
Definition: registers.hh:67
SparcISA::INTREG_G5
@ INTREG_G5
Definition: registers.hh:65
SparcISA::INTREG_L6
@ INTREG_L6
Definition: registers.hh:71
SparcISA::NumMicroIntRegs
@ NumMicroIntRegs
Definition: registers.hh:88
SparcISA::INTREG_L7
@ INTREG_L7
Definition: registers.hh:71
SparcISA::INTREG_OTHERWIN
@ INTREG_OTHERWIN
Definition: registers.hh:84
SparcISA::ZeroReg
const int ZeroReg
Definition: registers.hh:90
SparcISA::TotalNumRegs
const int TotalNumRegs
Definition: registers.hh:111
SparcISA::INTREG_L3
@ INTREG_L3
Definition: registers.hh:70
SparcISA::INTREG_CANSAVE
@ INTREG_CANSAVE
Definition: registers.hh:81
SparcISA::NWindows
const int NWindows
Definition: sparc_traits.hh:41
SparcISA::INTREG_O4
@ INTREG_O4
Definition: registers.hh:68
SparcISA::INTREG_I0
@ INTREG_I0
Definition: registers.hh:73
DummyVecPredReg
VecPredRegT< DummyVecElem, DummyNumVecElemPerVecReg, DummyVecPredRegHasPackedRepr, false > DummyVecPredReg
Definition: vec_pred_reg.hh:393
SparcISA::INTREG_I4
@ INTREG_I4
Definition: registers.hh:74
SparcISA::INTREG_L2
@ INTREG_L2
Definition: registers.hh:70
ArmISA::MaxInstSrcRegs
const int MaxInstSrcRegs
Definition: registers.hh:57
SparcISA::NumVecPredRegs
const int NumVecPredRegs
Definition: registers.hh:104
SparcISA::INTREG_G3
@ INTREG_G3
Definition: registers.hh:64
SparcISA
Definition: asi.cc:31
SparcISA::INTREG_O5
@ INTREG_O5
Definition: registers.hh:68
DummyVecRegContainer
DummyVecReg::Container DummyVecRegContainer
Definition: vec_reg.hh:668
miscregs.hh
SparcISA::INTREG_O1
@ INTREG_O1
Definition: registers.hh:67
SparcISA::INTREG_L5
@ INTREG_L5
Definition: registers.hh:71
VecPredRegT
Predicate register view.
Definition: vec_pred_reg.hh:66
SparcISA::VecRegSizeBytes
constexpr size_t VecRegSizeBytes
Definition: registers.hh:52
SparcISA::INTREG_G1
@ INTREG_G1
Definition: registers.hh:64
DummyConstVecReg
VecRegT< DummyVecElem, DummyNumVecElemPerVecReg, true > DummyConstVecReg
Definition: vec_reg.hh:667
SparcISA::NumMiscRegs
const int NumMiscRegs
Definition: miscregs.hh:170
SparcISA::INTREG_Y
@ INTREG_Y
Definition: registers.hh:79
SparcISA::VecPredRegSizeBits
constexpr size_t VecPredRegSizeBits
Definition: registers.hh:58
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
SparcISA::INTREG_CANRESTORE
@ INTREG_CANRESTORE
Definition: registers.hh:82
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:51
SparcISA::VecElem
::DummyVecElem VecElem
Definition: registers.hh:47
vec_reg.hh
SparcISA::ReturnAddressReg
const int ReturnAddressReg
Definition: registers.hh:93
SparcISA::INTREG_G0
@ INTREG_G0
Definition: registers.hh:64
SparcISA::INTREG_O7
@ INTREG_O7
Definition: registers.hh:68
SparcISA::INTREG_G4
@ INTREG_G4
Definition: registers.hh:65
SparcISA::INTREG_L0
@ INTREG_L0
Definition: registers.hh:70
SparcISA::INTREG_I1
@ INTREG_I1
Definition: registers.hh:73
DummyConstVecPredReg
VecPredRegT< DummyVecElem, DummyNumVecElemPerVecReg, DummyVecPredRegHasPackedRepr, true > DummyConstVecPredReg
Definition: vec_pred_reg.hh:396
types.hh
SparcISA::VecPredRegHasPackedRepr
constexpr bool VecPredRegHasPackedRepr
Definition: registers.hh:59
SparcISA::INTREG_L4
@ INTREG_L4
Definition: registers.hh:71
RiscvISA::MaxMiscDestRegs
const int MaxMiscDestRegs
Definition: registers.hh:62
SparcISA::INTREG_I5
@ INTREG_I5
Definition: registers.hh:74
DummyNumVecElemPerVecReg
constexpr unsigned DummyNumVecElemPerVecReg
Definition: vec_reg.hh:665
SparcISA::INTREG_O2
@ INTREG_O2
Definition: registers.hh:67
SparcISA::INTREG_G6
@ INTREG_G6
Definition: registers.hh:65
SparcISA::INTREG_I2
@ INTREG_I2
Definition: registers.hh:73
SparcISA::ReturnValueReg
const int ReturnValueReg
Definition: registers.hh:94
SparcISA::INTREG_UREG0
@ INTREG_UREG0
Definition: registers.hh:78
SparcISA::INTREG_WSTATE
@ INTREG_WSTATE
Definition: registers.hh:85
SparcISA::NumCCRegs
const int NumCCRegs
Definition: registers.hh:106
SparcISA::SyscallPseudoReturnReg
const int SyscallPseudoReturnReg
Definition: registers.hh:99
SparcISA::INTREG_GSR
@ INTREG_GSR
Definition: registers.hh:86
sparc_traits.hh
VecRegContainer
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
Definition: vec_reg.hh:156
SparcISA::INTREG_O6
@ INTREG_O6
Definition: registers.hh:68
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:95

Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17