gem5  v22.1.0.0
sve_mem.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 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_SVE_MEM_HH__
39 #define __ARCH_ARM_SVE_MEM_HH__
40 
42 #include "arch/arm/tlb.hh"
43 
44 namespace gem5
45 {
46 
47 namespace ArmISA
48 {
49 
51 {
52  protected:
55  uint64_t imm;
56 
58  bool baseIsSP;
59 
60  unsigned memAccessFlags;
61 
62  SveMemVecFillSpill(const char *mnem, ExtMachInst _machInst,
63  OpClass __opClass, RegIndex _dest,
64  RegIndex _base, uint64_t _imm)
65  : ArmStaticInst(mnem, _machInst, __opClass),
66  dest(_dest), base(_base), imm(_imm),
67  memAccessFlags(ArmISA::MMU::AllowUnaligned)
68  {
69  baseIsSP = isSP(_base);
70  }
71 
72  std::string generateDisassembly(
73  Addr pc, const loader::SymbolTable *symtab) const override;
74 };
75 
77 {
78  protected:
81  uint64_t imm;
82 
84  bool baseIsSP;
85 
86  unsigned memAccessFlags;
87 
88  SveMemPredFillSpill(const char *mnem, ExtMachInst _machInst,
89  OpClass __opClass, RegIndex _dest,
90  RegIndex _base, uint64_t _imm)
91  : ArmStaticInst(mnem, _machInst, __opClass),
92  dest(_dest), base(_base), imm(_imm),
93  memAccessFlags(ArmISA::MMU::AllowUnaligned)
94  {
95  baseIsSP = isSP(_base);
96  }
97 
98  std::string generateDisassembly(
99  Addr pc, const loader::SymbolTable *symtab) const override;
100 };
101 
103 {
104  protected:
109 
111  bool baseIsSP;
112 
113  unsigned memAccessFlags;
114 
115  SveContigMemSS(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
116  RegIndex _dest, RegIndex _gp, RegIndex _base,
117  RegIndex _offset)
118  : ArmStaticInst(mnem, _machInst, __opClass),
119  dest(_dest), gp(_gp), base(_base), offset(_offset),
120  memAccessFlags(ArmISA::MMU::AllowUnaligned)
121  {
122  baseIsSP = isSP(_base);
123  }
124 
125  std::string generateDisassembly(
126  Addr pc, const loader::SymbolTable *symtab) const override;
127 };
128 
130 {
131  protected:
135  uint64_t imm;
136 
138  bool baseIsSP;
139 
140  unsigned memAccessFlags;
141 
142  SveContigMemSI(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
143  RegIndex _dest, RegIndex _gp, RegIndex _base,
144  uint64_t _imm)
145  : ArmStaticInst(mnem, _machInst, __opClass),
146  dest(_dest), gp(_gp), base(_base), imm(_imm),
147  memAccessFlags(ArmISA::MMU::AllowUnaligned)
148  {
149  baseIsSP = isSP(_base);
150  }
151 
152  std::string generateDisassembly(
153  Addr pc, const loader::SymbolTable *symtab) const override;
154 };
155 
156 } // namespace ArmISA
157 } // namespace gem5
158 
159 #endif // __ARCH_ARM_SVE_MEM_HH__
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: sve_mem.cc:99
SveContigMemSI(const char *mnem, ExtMachInst _machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, uint64_t _imm)
Definition: sve_mem.hh:142
bool baseIsSP
True if the base register is SP (used for SP alignment checking).
Definition: sve_mem.hh:138
SveContigMemSS(const char *mnem, ExtMachInst _machInst, OpClass __opClass, RegIndex _dest, RegIndex _gp, RegIndex _base, RegIndex _offset)
Definition: sve_mem.hh:115
bool baseIsSP
True if the base register is SP (used for SP alignment checking).
Definition: sve_mem.hh:111
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: sve_mem.cc:79
bool baseIsSP
True if the base register is SP (used for SP alignment checking).
Definition: sve_mem.hh:84
SveMemPredFillSpill(const char *mnem, ExtMachInst _machInst, OpClass __opClass, RegIndex _dest, RegIndex _base, uint64_t _imm)
Definition: sve_mem.hh:88
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: sve_mem.cc:63
SveMemVecFillSpill(const char *mnem, ExtMachInst _machInst, OpClass __opClass, RegIndex _dest, RegIndex _base, uint64_t _imm)
Definition: sve_mem.hh:62
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: sve_mem.cc:47
bool baseIsSP
True if the base register is SP (used for SP alignment checking).
Definition: sve_mem.hh:58
static bool isSP(RegIndex reg)
Definition: int.hh:619
Bitfield< 4 > pc
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint16_t RegIndex
Definition: types.hh:176
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147

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