gem5 v24.0.0.0
Loading...
Searching...
No Matches
sme.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 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_INSTS_SME_HH__
39#define __ARCH_ARM_INSTS_SME_HH__
40
42
43namespace gem5
44{
45
46namespace ArmISA
47{
48
49// Used for SME ADDHA/ADDVA
50class SmeAddOp : public ArmStaticInst
51{
52 protected:
53 uint64_t imm;
57
58 SmeAddOp(const char *mnem, ExtMachInst _machInst,
59 OpClass __opClass, uint64_t _imm, RegIndex _op1,
60 RegIndex _gp1, RegIndex _gp2) :
61 ArmStaticInst(mnem, _machInst, __opClass),
62 imm(_imm), op1(_op1), gp1(_gp1), gp2(_gp2)
63 {}
64
65 std::string generateDisassembly(
66 Addr pc, const loader::SymbolTable *symtab) const override;
67};
68
69// Used for the SME ADDSPL/ADDSVL instructions
71{
72 protected:
75 int8_t imm;
76
77 SmeAddVlOp(const char *mnem, ExtMachInst _machInst,
78 OpClass __opClass, RegIndex _dest, RegIndex _op1,
79 int8_t _imm) :
80 ArmStaticInst(mnem, _machInst, __opClass),
81 dest(_dest), op1(_op1), imm(_imm)
82 {}
83
84 std::string generateDisassembly(
85 Addr pc, const loader::SymbolTable *symtab) const override;
86};
87
88// Used for SME LD1x/ST1x instrucions
90{
91 protected:
92 uint64_t imm;
97 bool V;
98
99 SmeLd1xSt1xOp(const char *mnem, ExtMachInst _machInst,
100 OpClass __opClass, uint64_t _imm, RegIndex _op1,
101 RegIndex _gp, RegIndex _op2,
102 RegIndex _op3, bool _V) :
103 ArmStaticInst(mnem, _machInst, __opClass),
104 imm(_imm), op1(_op1), gp(_gp), op2(_op2), op3(_op3), V(_V)
105 {}
106
107 std::string generateDisassembly(
108 Addr pc, const loader::SymbolTable *symtab) const override;
109};
110
111// Used for SME LDR/STR instructions
113{
114 protected:
115 uint64_t imm;
118
119 SmeLdrStrOp(const char *mnem, ExtMachInst _machInst,
120 OpClass __opClass, uint64_t _imm, RegIndex _op1,
121 RegIndex _op2) :
122 ArmStaticInst(mnem, _machInst, __opClass),
123 imm(_imm), op1(_op1), op2(_op2)
124 {}
125
126 std::string generateDisassembly(
127 Addr pc, const loader::SymbolTable *symtab) const override;
128};
129
130// Used for SME MOVA (Tile to Vector)
132{
133 protected:
135 uint8_t imm;
138 bool v;
139
140 SmeMovExtractOp(const char *mnem, ExtMachInst _machInst,
141 OpClass __opClass, RegIndex _op1, uint8_t _imm,
142 RegIndex _gp, RegIndex _op2, bool _v) :
143 ArmStaticInst(mnem, _machInst, __opClass),
144 op1(_op1), imm(_imm), gp(_gp), op2(_op2), v(_v)
145 {}
146
147 std::string generateDisassembly(
148 Addr pc, const loader::SymbolTable *symtab) const override;
149};
150
151// Used for SME MOVA (Vector to Tile)
153{
154 protected:
155 uint8_t imm;
159 bool v;
160
161 SmeMovInsertOp(const char *mnem, ExtMachInst _machInst,
162 OpClass __opClass, uint8_t _imm, RegIndex _op1,
163 RegIndex _gp, RegIndex _op2, bool _v) :
164 ArmStaticInst(mnem, _machInst, __opClass),
165 imm(_imm), op1(_op1), gp(_gp), op2(_op2), v(_v)
166 {}
167
168 std::string generateDisassembly(
169 Addr pc, const loader::SymbolTable *symtab) const override;
170};
171
172// Used for SME output product instructions
173class SmeOPOp : public ArmStaticInst
174{
175 protected:
176 uint64_t imm;
181
182 SmeOPOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
183 uint64_t _imm, RegIndex _op1, RegIndex _gp1,
184 RegIndex _gp2, RegIndex _op2) :
185 ArmStaticInst(mnem, _machInst, __opClass),
186 imm(_imm), op1(_op1), gp1(_gp1), gp2(_gp2), op2(_op2)
187 {}
188
189 std::string generateDisassembly(
190 Addr pc, const loader::SymbolTable *symtab) const override;
191};
192
193// Used for the SME RDSVL instruction
195{
196 protected:
198 int8_t imm;
199
200 SmeRdsvlOp(const char *mnem, ExtMachInst _machInst,
201 OpClass __opClass, RegIndex _dest, int8_t _imm) :
202 ArmStaticInst(mnem, _machInst, __opClass),
203 dest(_dest), imm(_imm)
204 {}
205
206 std::string generateDisassembly(
207 Addr pc, const loader::SymbolTable *symtab) const override;
208};
209
210// Used for SME ZERO
212{
213 protected:
214 uint8_t imm;
215
216 SmeZeroOp(const char *mnem, ExtMachInst _machInst,
217 OpClass __opClass, uint8_t _imm) :
218 ArmStaticInst(mnem, _machInst, __opClass),
219 imm(_imm)
220 {}
221
222 std::string generateDisassembly(
223 Addr pc, const loader::SymbolTable *symtab) const override;
224};
225
226} // namespace ArmISA
227} // namespace gem5
228
229#endif // __ARCH_ARM_INSTS_SME_HH__
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:47
SmeAddOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint64_t _imm, RegIndex _op1, RegIndex _gp1, RegIndex _gp2)
Definition sme.hh:58
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:63
SmeAddVlOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, RegIndex _dest, RegIndex _op1, int8_t _imm)
Definition sme.hh:77
SmeLd1xSt1xOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint64_t _imm, RegIndex _op1, RegIndex _gp, RegIndex _op2, RegIndex _op3, bool _V)
Definition sme.hh:99
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:78
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:96
SmeLdrStrOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint64_t _imm, RegIndex _op1, RegIndex _op2)
Definition sme.hh:119
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:110
SmeMovExtractOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, RegIndex _op1, uint8_t _imm, RegIndex _gp, RegIndex _op2, bool _v)
Definition sme.hh:140
SmeMovInsertOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint8_t _imm, RegIndex _op1, RegIndex _gp, RegIndex _op2, bool _v)
Definition sme.hh:161
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:126
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:142
SmeOPOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint64_t _imm, RegIndex _op1, RegIndex _gp1, RegIndex _gp2, RegIndex _op2)
Definition sme.hh:182
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:160
SmeRdsvlOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, RegIndex _dest, int8_t _imm)
Definition sme.hh:200
SmeZeroOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint8_t _imm)
Definition sme.hh:216
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition sme.cc:173
Bitfield< 4 > pc
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
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 Tue Jun 18 2024 16:23:56 for gem5 by doxygen 1.11.0