gem5  v22.1.0.0
int.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 ARM Limited
3  * Copyright (c) 2014-2015 Sven Karlsson
4  * Copyright (c) 2019 Yifei Liu
5  * Copyright (c) 2020 Barkhausen Institut
6  * Copyright (c) 2021 StreamComputing Corp
7  * All rights reserved
8  *
9  * The license below extends only to copyright in the software and shall
10  * not be construed as granting a license to any other intellectual
11  * property including but not limited to intellectual property relating
12  * to a hardware implementation of the functionality of the software
13  * licensed hereunder. You may use the software subject to the license
14  * terms below provided that you ensure that this notice is replicated
15  * unmodified and in its entirety in all distributions of the software,
16  * modified or unmodified, in source code or in binary form.
17  *
18  * Copyright (c) 2016 RISC-V Foundation
19  * Copyright (c) 2016 The University of Virginia
20  * All rights reserved.
21  *
22  * Redistribution and use in source and binary forms, with or without
23  * modification, are permitted provided that the following conditions are
24  * met: redistributions of source code must retain the above copyright
25  * notice, this list of conditions and the following disclaimer;
26  * redistributions in binary form must reproduce the above copyright
27  * notice, this list of conditions and the following disclaimer in the
28  * documentation and/or other materials provided with the distribution;
29  * neither the name of the copyright holders nor the names of its
30  * contributors may be used to endorse or promote products derived from
31  * this software without specific prior written permission.
32  *
33  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
36  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
38  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
40  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
41  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
43  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44  */
45 
46 #ifndef __ARCH_RISCV_REGS_INT_HH__
47 #define __ARCH_RISCV_REGS_INT_HH__
48 
49 #include <string>
50 #include <vector>
51 
52 #include "cpu/reg_class.hh"
53 #include "debug/IntRegs.hh"
54 
55 namespace gem5
56 {
57 
58 namespace RiscvISA
59 {
60 
61 namespace int_reg
62 {
63 
64 enum : RegIndex
65 {
74 
76 
78 
79  NumRegs
80 };
81 
82 } // namespace int_reg
83 
85  int_reg::NumRegs, debug::IntRegs);
86 
87 namespace int_reg
88 {
89 
90 inline constexpr RegId
124 
126  "zero", "ra", "sp", "gp",
127  "tp", "t0", "t1", "t2",
128  "s0", "s1", "a0", "a1",
129  "a2", "a3", "a4", "a5",
130  "a6", "a7", "s2", "s3",
131  "s4", "s5", "s6", "s7",
132  "s8", "s9", "s10", "s11",
133  "t3", "t4", "t5", "t6"
134 };
135 
136 } // namespace int_reg
137 
138 // Semantically meaningful register indices
139 inline constexpr auto
146 
147 inline constexpr RegId ArgumentRegs[] = {
150 };
151 
152 } // namespace RiscvISA
153 } // namespace gem5
154 
155 #endif // __ARCH_RISCV_REGS_INT_HH__
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:91
constexpr RegId A1
Definition: int.hh:102
constexpr RegId T2
Definition: int.hh:98
constexpr RegId Zero
Definition: int.hh:91
constexpr RegId T0
Definition: int.hh:96
constexpr RegId Tp
Definition: int.hh:95
constexpr RegId Sp
Definition: int.hh:93
constexpr RegId A3
Definition: int.hh:104
constexpr RegId S7
Definition: int.hh:114
constexpr RegId S8
Definition: int.hh:115
constexpr RegId T4
Definition: int.hh:120
constexpr RegId T1
Definition: int.hh:97
constexpr RegId A0
Definition: int.hh:101
constexpr RegId A2
Definition: int.hh:103
constexpr RegId Ra
Definition: int.hh:92
constexpr RegId S5
Definition: int.hh:112
constexpr RegId A6
Definition: int.hh:107
constexpr RegId T6
Definition: int.hh:122
constexpr RegId A7
Definition: int.hh:108
constexpr RegId S6
Definition: int.hh:113
constexpr RegId S10
Definition: int.hh:117
constexpr RegId S1
Definition: int.hh:100
constexpr RegId A4
Definition: int.hh:105
constexpr RegId S11
Definition: int.hh:118
constexpr RegId S4
Definition: int.hh:111
constexpr RegId S0
Definition: int.hh:99
constexpr RegId S3
Definition: int.hh:110
constexpr RegId Gp
Definition: int.hh:94
constexpr RegId S9
Definition: int.hh:116
constexpr RegId S2
Definition: int.hh:109
constexpr RegId T3
Definition: int.hh:119
constexpr RegId Ureg0
Definition: int.hh:123
const std::vector< std::string > RegNames
Definition: int.hh:125
constexpr RegId A5
Definition: int.hh:106
constexpr RegId T5
Definition: int.hh:121
constexpr auto & AMOTempReg
Definition: int.hh:144
constexpr auto & StackPointerReg
Definition: int.hh:141
constexpr RegId ArgumentRegs[]
Definition: int.hh:147
constexpr auto & ThreadPointerReg
Definition: int.hh:142
constexpr RegClass intRegClass(IntRegClass, IntRegClassName, int_reg::NumRegs, debug::IntRegs)
constexpr auto & ReturnAddrReg
Definition: int.hh:140
constexpr auto & ReturnValueReg
Definition: int.hh:143
constexpr auto & SyscallNumReg
Definition: int.hh:145
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint16_t RegIndex
Definition: types.hh:176
constexpr char IntRegClassName[]
Definition: reg_class.hh:73
@ IntRegClass
Integer register.
Definition: reg_class.hh:60

Generated on Wed Dec 21 2022 10:22:26 for gem5 by doxygen 1.9.1