gem5  v21.1.0.2
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 namespace gem5
53 {
54 
55 namespace RiscvISA
56 {
57 
58 const int NumIntArchRegs = 32;
59 const int NumMicroIntRegs = 1;
61 
62 // Semantically meaningful register indices
63 const int ReturnAddrReg = 1;
64 const int StackPointerReg = 2;
65 const int ThreadPointerReg = 4;
66 const int ReturnValueReg = 10;
67 const std::vector<int> ArgumentRegs = {10, 11, 12, 13, 14, 15, 16, 17};
68 const int AMOTempReg = 32;
69 
70 const int SyscallNumReg = 17;
71 
73  "zero", "ra", "sp", "gp",
74  "tp", "t0", "t1", "t2",
75  "s0", "s1", "a0", "a1",
76  "a2", "a3", "a4", "a5",
77  "a6", "a7", "s2", "s3",
78  "s4", "s5", "s6", "s7",
79  "s8", "s9", "s10", "s11",
80  "t3", "t4", "t5", "t6"
81 };
82 
83 } // namespace RiscvISA
84 } // namespace gem5
85 
86 #endif // __ARCH_RISCV_REGS_INT_HH__
gem5::RiscvISA::IntRegNames
const std::vector< std::string > IntRegNames
Definition: int.hh:72
gem5::RiscvISA::ArgumentRegs
const std::vector< int > ArgumentRegs
Definition: int.hh:67
gem5::RiscvISA::SyscallNumReg
const int SyscallNumReg
Definition: int.hh:70
gem5::RiscvISA::NumIntRegs
const int NumIntRegs
Definition: int.hh:60
std::vector< int >
gem5::RiscvISA::NumMicroIntRegs
const int NumMicroIntRegs
Definition: int.hh:59
gem5::RiscvISA::ReturnAddrReg
const int ReturnAddrReg
Definition: int.hh:63
gem5::RiscvISA::StackPointerReg
const int StackPointerReg
Definition: int.hh:64
gem5::RiscvISA::NumIntArchRegs
const int NumIntArchRegs
Definition: int.hh:58
gem5::RiscvISA::ThreadPointerReg
const int ThreadPointerReg
Definition: int.hh:65
gem5::RiscvISA::ReturnValueReg
const int ReturnValueReg
Definition: int.hh:66
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::RiscvISA::AMOTempReg
const int AMOTempReg
Definition: int.hh:68

Generated on Tue Sep 21 2021 12:24:38 for gem5 by doxygen 1.8.17