gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cc.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef __ARCH_ARM_REGS_CC_HH__
39 #define __ARCH_ARM_REGS_CC_HH__
40 
41 #include "cpu/reg_class.hh"
42 #include "debug/CCRegs.hh"
43 
44 namespace gem5
45 {
46 
47 namespace ArmISA
48 {
49 
50 namespace cc_reg
51 {
52 
53 enum : RegIndex
54 {
62 };
63 
64 const char * const RegName[NumRegs] = {
65  "nz",
66  "c",
67  "v",
68  "ge",
69  "fp",
70  "zero"
71 };
72 
73 } // namespace cc_reg
74 
75 class CCRegClassOps : public RegClassOps
76 {
77  public:
78  std::string
79  regName(const RegId &id) const override
80  {
81  return cc_reg::RegName[id.index()];
82  }
83 };
84 
86 
88  cc_reg::NumRegs, debug::CCRegs).ops(ccRegClassOps);
89 
90 namespace cc_reg
91 {
92 
93 inline constexpr RegId
100 
101 } // namespace cc_reg
102 
104 {
105  COND_EQ = 0,
106  COND_NE, // 1
107  COND_CS, // 2
108  COND_CC, // 3
109  COND_MI, // 4
110  COND_PL, // 5
111  COND_VS, // 6
112  COND_VC, // 7
113  COND_HI, // 8
114  COND_LS, // 9
115  COND_GE, // 10
116  COND_LT, // 11
117  COND_GT, // 12
118  COND_LE, // 13
119  COND_AL, // 14
120  COND_UC // 15
121 };
122 
123 } // namespace ArmISA
124 } // namespace gem5
125 
126 #endif // __ARCH_ARM_REGS_CC_HH__
gem5::ArmISA::CCRegClassOps
Definition: cc.hh:75
gem5::ArmISA::COND_HI
@ COND_HI
Definition: cc.hh:113
gem5::ArmISA::cc_reg::V
constexpr RegId V
Definition: cc.hh:96
gem5::ArmISA::cc_reg::_FpIdx
@ _FpIdx
Definition: cc.hh:59
gem5::ArmISA::COND_NE
@ COND_NE
Definition: cc.hh:106
gem5::CCRegClass
@ CCRegClass
Condition-code register.
Definition: reg_class.hh:68
gem5::ArmISA::cc_reg::_VIdx
@ _VIdx
Definition: cc.hh:57
gem5::ArmISA::cc_reg::RegName
const char *const RegName[NumRegs]
Definition: cc.hh:64
gem5::ArmISA::COND_PL
@ COND_PL
Definition: cc.hh:110
gem5::ArmISA::ccRegClassOps
static CCRegClassOps ccRegClassOps
Definition: cc.hh:85
gem5::ArmISA::COND_CS
@ COND_CS
Definition: cc.hh:107
gem5::ArmISA::COND_LT
@ COND_LT
Definition: cc.hh:116
gem5::ArmISA::cc_reg::NumRegs
@ NumRegs
Definition: cc.hh:61
gem5::ArmISA::cc_reg::C
constexpr RegId C
Definition: cc.hh:95
gem5::ArmISA::COND_VC
@ COND_VC
Definition: cc.hh:112
gem5::ArmISA::COND_UC
@ COND_UC
Definition: cc.hh:120
gem5::ArmISA::COND_EQ
@ COND_EQ
Definition: cc.hh:105
gem5::ArmISA::COND_VS
@ COND_VS
Definition: cc.hh:111
gem5::ArmISA::cc_reg::Fp
constexpr RegId Fp
Definition: cc.hh:98
gem5::ArmISA::cc_reg::_ZeroIdx
@ _ZeroIdx
Definition: cc.hh:60
gem5::ArmISA::cc_reg::_NzIdx
@ _NzIdx
Definition: cc.hh:55
gem5::ArmISA::COND_AL
@ COND_AL
Definition: cc.hh:119
gem5::ArmISA::cc_reg::_GeIdx
@ _GeIdx
Definition: cc.hh:58
gem5::RegClass
Definition: reg_class.hh:184
gem5::CCRegClassName
constexpr char CCRegClassName[]
Definition: reg_class.hh:80
gem5::ArmISA::COND_MI
@ COND_MI
Definition: cc.hh:109
gem5::ArmISA::COND_LS
@ COND_LS
Definition: cc.hh:114
gem5::ArmISA::cc_reg::Zero
constexpr RegId Zero
Definition: cc.hh:99
gem5::ArmISA::COND_LE
@ COND_LE
Definition: cc.hh:118
gem5::ArmISA::cc_reg::Ge
constexpr RegId Ge
Definition: cc.hh:97
gem5::RegClass::ops
constexpr RegClass ops(const RegClassOps &new_ops) const
Definition: reg_class.hh:218
gem5::ArmISA::ConditionCode
ConditionCode
Definition: cc.hh:103
reg_class.hh
gem5::ArmISA::COND_GE
@ COND_GE
Definition: cc.hh:115
gem5::ArmISA::cc_reg::Nz
constexpr RegId Nz
Definition: cc.hh:94
gem5::RegIndex
uint16_t RegIndex
Definition: types.hh:176
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::ArmISA::CCRegClassOps::regName
std::string regName(const RegId &id) const override
Print the name of the register specified in id.
Definition: cc.hh:79
gem5::ArmISA::COND_GT
@ COND_GT
Definition: cc.hh:117
gem5::ArmISA::ccRegClass
constexpr RegClass ccRegClass
Definition: cc.hh:87
gem5::ArmISA::cc_reg::_CIdx
@ _CIdx
Definition: cc.hh:56
gem5::RegClassOps
Definition: reg_class.hh:167
gem5::RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:92
gem5::ArmISA::COND_CC
@ COND_CC
Definition: cc.hh:108

Generated on Sun Jul 30 2023 01:56:49 for gem5 by doxygen 1.8.17