gem5  v20.1.0.0
data64.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2013 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_DATA64_HH__
39 #define __ARCH_ARM_INSTS_DATA64_HH__
40 
42 #include "base/trace.hh"
43 
44 namespace ArmISA
45 {
46 
47 class DataXImmOp : public ArmStaticInst
48 {
49  protected:
51  uint64_t imm;
52 
53  DataXImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
54  IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm) :
55  ArmStaticInst(mnem, _machInst, __opClass),
56  dest(_dest), op1(_op1), imm(_imm)
57  {}
58 
59  std::string generateDisassembly(
60  Addr pc, const Loader::SymbolTable *symtab) const override;
61 };
62 
64 {
65  protected:
67  uint64_t imm;
68 
69  DataXImmOnlyOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
70  IntRegIndex _dest, uint64_t _imm) :
71  ArmStaticInst(mnem, _machInst, __opClass),
72  dest(_dest), imm(_imm)
73  {}
74 
75  std::string generateDisassembly(
76  Addr pc, const Loader::SymbolTable *symtab) const override;
77 };
78 
79 class DataXSRegOp : public ArmStaticInst
80 {
81  protected:
83  int32_t shiftAmt;
85 
86  DataXSRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
87  IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
88  int32_t _shiftAmt, ArmShiftType _shiftType) :
89  ArmStaticInst(mnem, _machInst, __opClass),
90  dest(_dest), op1(_op1), op2(_op2),
91  shiftAmt(_shiftAmt), shiftType(_shiftType)
92  {}
93 
94  std::string generateDisassembly(
95  Addr pc, const Loader::SymbolTable *symtab) const override;
96 };
97 
98 class DataXERegOp : public ArmStaticInst
99 {
100  protected:
103  int32_t shiftAmt;
104 
105  DataXERegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
106  IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
107  ArmExtendType _extendType, int32_t _shiftAmt) :
108  ArmStaticInst(mnem, _machInst, __opClass),
109  dest(_dest), op1(_op1), op2(_op2),
110  extendType(_extendType), shiftAmt(_shiftAmt)
111  {}
112 
113  std::string generateDisassembly(
114  Addr pc, const Loader::SymbolTable *symtab) const override;
115 };
116 
118 {
119  protected:
121 
122  DataX1RegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
123  IntRegIndex _dest, IntRegIndex _op1) :
124  ArmStaticInst(mnem, _machInst, __opClass), dest(_dest), op1(_op1)
125  {}
126 
127  std::string generateDisassembly(
128  Addr pc, const Loader::SymbolTable *symtab) const override;
129 };
130 
132 {
133  protected:
135  uint64_t imm;
136 
137  DataX1RegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
138  IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm) :
139  ArmStaticInst(mnem, _machInst, __opClass), dest(_dest), op1(_op1),
140  imm(_imm)
141  {}
142 
143  std::string generateDisassembly(
144  Addr pc, const Loader::SymbolTable *symtab) const override;
145 };
146 
148 {
149  protected:
151  uint64_t imm1, imm2;
152 
153  DataX1Reg2ImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
154  IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm1,
155  uint64_t _imm2) :
156  ArmStaticInst(mnem, _machInst, __opClass), dest(_dest), op1(_op1),
157  imm1(_imm1), imm2(_imm2)
158  {}
159 
160  std::string generateDisassembly(
161  Addr pc, const Loader::SymbolTable *symtab) const override;
162 };
163 
165 {
166  protected:
168 
169  DataX2RegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
170  IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2) :
171  ArmStaticInst(mnem, _machInst, __opClass),
172  dest(_dest), op1(_op1), op2(_op2)
173  {}
174 
175  std::string generateDisassembly(
176  Addr pc, const Loader::SymbolTable *symtab) const override;
177 };
178 
180 {
181  protected:
183  uint64_t imm;
184 
185  DataX2RegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
186  IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
187  uint64_t _imm) :
188  ArmStaticInst(mnem, _machInst, __opClass),
189  dest(_dest), op1(_op1), op2(_op2), imm(_imm)
190  {}
191 
192  std::string generateDisassembly(
193  Addr pc, const Loader::SymbolTable *symtab) const override;
194 };
195 
197 {
198  protected:
200 
201  DataX3RegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
202  IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
203  IntRegIndex _op3) :
204  ArmStaticInst(mnem, _machInst, __opClass),
205  dest(_dest), op1(_op1), op2(_op2), op3(_op3)
206  {}
207 
208  std::string generateDisassembly(
209  Addr pc, const Loader::SymbolTable *symtab) const override;
210 };
211 
213 {
214  protected:
216  uint64_t imm;
218  uint8_t defCc;
219 
220  DataXCondCompImmOp(const char *mnem, ExtMachInst _machInst,
221  OpClass __opClass, IntRegIndex _op1, uint64_t _imm,
222  ConditionCode _condCode, uint8_t _defCc) :
223  ArmStaticInst(mnem, _machInst, __opClass),
224  op1(_op1), imm(_imm), condCode(_condCode), defCc(_defCc)
225  {}
226 
227  std::string generateDisassembly(
228  Addr pc, const Loader::SymbolTable *symtab) const override;
229 };
230 
232 {
233  protected:
236  uint8_t defCc;
237 
238  DataXCondCompRegOp(const char *mnem, ExtMachInst _machInst,
239  OpClass __opClass, IntRegIndex _op1, IntRegIndex _op2,
240  ConditionCode _condCode, uint8_t _defCc) :
241  ArmStaticInst(mnem, _machInst, __opClass),
242  op1(_op1), op2(_op2), condCode(_condCode), defCc(_defCc)
243  {}
244 
245  std::string generateDisassembly(
246  Addr pc, const Loader::SymbolTable *symtab) const override;
247 };
248 
250 {
251  protected:
254 
255  DataXCondSelOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
256  IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
257  ConditionCode _condCode) :
258  ArmStaticInst(mnem, _machInst, __opClass),
259  dest(_dest), op1(_op1), op2(_op2), condCode(_condCode)
260  {}
261 
262  std::string generateDisassembly(
263  Addr pc, const Loader::SymbolTable *symtab) const override;
264 };
265 
266 }
267 
268 #endif //__ARCH_ARM_INSTS_PREDINST_HH__
ArmISA::DataXERegOp
Definition: data64.hh:98
ArmISA::DataXSRegOp::dest
IntRegIndex dest
Definition: data64.hh:82
ArmISA::DataXImmOp::op1
IntRegIndex op1
Definition: data64.hh:50
ArmISA::DataX2RegOp::op2
IntRegIndex op2
Definition: data64.hh:167
ArmISA::DataX1Reg2ImmOp::op1
IntRegIndex op1
Definition: data64.hh:150
ArmISA::DataXCondSelOp::op2
IntRegIndex op2
Definition: data64.hh:252
ArmISA::DataX1RegImmOp::DataX1RegImmOp
DataX1RegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm)
Definition: data64.hh:137
ArmISA::ArmShiftType
ArmShiftType
Definition: types.hh:567
ArmISA::ConditionCode
ConditionCode
Definition: ccregs.hh:63
ArmISA::DataX3RegOp::op1
IntRegIndex op1
Definition: data64.hh:199
ArmISA::DataXCondCompRegOp
Definition: data64.hh:231
ArmISA::DataX1RegImmOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:97
ArmISA::DataXCondCompRegOp::DataXCondCompRegOp
DataXCondCompRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _op1, IntRegIndex _op2, ConditionCode _condCode, uint8_t _defCc)
Definition: data64.hh:238
ArmISA::DataXERegOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:75
ArmISA::DataXCondCompRegOp::op2
IntRegIndex op2
Definition: data64.hh:234
ArmISA::DataXCondSelOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:196
ArmISA::DataX2RegOp::op1
IntRegIndex op1
Definition: data64.hh:167
ArmISA::DataXSRegOp::DataXSRegOp
DataXSRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, int32_t _shiftAmt, ArmShiftType _shiftType)
Definition: data64.hh:86
ArmISA::DataX1Reg2ImmOp::imm2
uint64_t imm2
Definition: data64.hh:151
ArmISA::DataXCondSelOp
Definition: data64.hh:249
Loader::SymbolTable
Definition: symtab.hh:59
ArmISA::IntRegIndex
IntRegIndex
Definition: intregs.hh:51
ArmISA::DataX1RegImmOp::imm
uint64_t imm
Definition: data64.hh:135
ArmISA::DataX1RegImmOp::dest
IntRegIndex dest
Definition: data64.hh:134
ArmISA::DataXCondCompRegOp::op1
IntRegIndex op1
Definition: data64.hh:234
ArmISA::DataXERegOp::DataXERegOp
DataXERegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, ArmExtendType _extendType, int32_t _shiftAmt)
Definition: data64.hh:105
ArmISA::DataXCondCompImmOp::op1
IntRegIndex op1
Definition: data64.hh:215
ArmISA::DataX2RegImmOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:137
ArmISA::DataX2RegImmOp
Definition: data64.hh:179
ArmISA::DataX1RegImmOp
Definition: data64.hh:131
ArmISA::DataX3RegOp::op3
IntRegIndex op3
Definition: data64.hh:199
ArmISA::DataXCondCompImmOp::DataXCondCompImmOp
DataXCondCompImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _op1, uint64_t _imm, ConditionCode _condCode, uint8_t _defCc)
Definition: data64.hh:220
ArmISA::DataXImmOp::DataXImmOp
DataXImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm)
Definition: data64.hh:53
ArmISA
Definition: ccregs.hh:41
ArmISA::DataXSRegOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:65
ArmISA::DataXImmOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:44
ArmISA::DataXERegOp::extendType
ArmExtendType extendType
Definition: data64.hh:102
ArmISA::DataX2RegImmOp::op2
IntRegIndex op2
Definition: data64.hh:182
ArmISA::DataXImmOnlyOp::dest
IntRegIndex dest
Definition: data64.hh:66
ArmISA::ArmStaticInst
Definition: static_inst.hh:60
ArmISA::DataXCondCompRegOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:181
ArmISA::DataXImmOp::dest
IntRegIndex dest
Definition: data64.hh:50
ArmISA::DataXCondCompImmOp
Definition: data64.hh:212
ArmISA::DataXImmOp::imm
uint64_t imm
Definition: data64.hh:51
ArmISA::DataX3RegOp::op2
IntRegIndex op2
Definition: data64.hh:199
ArmISA::DataXImmOnlyOp
Definition: data64.hh:63
ArmISA::DataXSRegOp::shiftAmt
int32_t shiftAmt
Definition: data64.hh:83
ArmISA::DataXERegOp::dest
IntRegIndex dest
Definition: data64.hh:101
ArmISA::DataX2RegOp
Definition: data64.hh:164
ArmISA::DataXCondCompImmOp::condCode
ConditionCode condCode
Definition: data64.hh:217
MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:240
ArmISA::DataX3RegOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:152
ArmISA::DataX1RegImmOp::op1
IntRegIndex op1
Definition: data64.hh:134
ArmISA::DataXCondSelOp::condCode
ConditionCode condCode
Definition: data64.hh:253
ArmISA::DataX1Reg2ImmOp::DataX1Reg2ImmOp
DataX1Reg2ImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, uint64_t _imm1, uint64_t _imm2)
Definition: data64.hh:153
ArmISA::DataX2RegOp::dest
IntRegIndex dest
Definition: data64.hh:167
ArmISA::DataX2RegOp::DataX2RegOp
DataX2RegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2)
Definition: data64.hh:169
ArmISA::DataX3RegOp::dest
IntRegIndex dest
Definition: data64.hh:199
ArmISA::DataX2RegOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:123
ArmISA::DataX2RegImmOp::DataX2RegImmOp
DataX2RegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, uint64_t _imm)
Definition: data64.hh:185
StaticInst::ExtMachInst
TheISA::ExtMachInst ExtMachInst
Binary extended machine instruction type.
Definition: static_inst.hh:89
ArmISA::DataXERegOp::op2
IntRegIndex op2
Definition: data64.hh:101
ArmISA::DataX3RegOp
Definition: data64.hh:196
ArmISA::DataX2RegImmOp::op1
IntRegIndex op1
Definition: data64.hh:182
ArmISA::DataXERegOp::op1
IntRegIndex op1
Definition: data64.hh:101
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
ArmISA::DataX1RegOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:85
ArmISA::DataXCondCompImmOp::defCc
uint8_t defCc
Definition: data64.hh:218
ArmISA::DataXCondCompRegOp::defCc
uint8_t defCc
Definition: data64.hh:236
ArmISA::DataXSRegOp::op1
IntRegIndex op1
Definition: data64.hh:82
ArmISA::DataX1Reg2ImmOp::imm1
uint64_t imm1
Definition: data64.hh:151
ArmISA::DataXCondSelOp::DataXCondSelOp
DataXCondSelOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, ConditionCode _condCode)
Definition: data64.hh:255
ArmISA::ArmExtendType
ArmExtendType
Definition: types.hh:575
ArmISA::DataXCondCompImmOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:168
ArmISA::DataXImmOnlyOp::imm
uint64_t imm
Definition: data64.hh:67
ArmISA::DataX2RegImmOp::imm
uint64_t imm
Definition: data64.hh:183
ArmISA::DataXCondCompRegOp::condCode
ConditionCode condCode
Definition: data64.hh:235
ArmISA::DataXImmOnlyOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:54
static_inst.hh
ArmISA::DataXSRegOp::op2
IntRegIndex op2
Definition: data64.hh:82
ArmISA::DataXCondCompImmOp::imm
uint64_t imm
Definition: data64.hh:216
ArmISA::DataX1Reg2ImmOp::generateDisassembly
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: data64.cc:110
ArmISA::DataX1RegOp::op1
IntRegIndex op1
Definition: data64.hh:120
trace.hh
ArmISA::DataXImmOp
Definition: data64.hh:47
ArmISA::DataXERegOp::shiftAmt
int32_t shiftAmt
Definition: data64.hh:103
ArmISA::DataX1RegOp::DataX1RegOp
DataX1RegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1)
Definition: data64.hh:122
ArmISA::DataXCondSelOp::op1
IntRegIndex op1
Definition: data64.hh:252
ArmISA::DataX1RegOp::dest
IntRegIndex dest
Definition: data64.hh:120
ArmISA::DataXSRegOp
Definition: data64.hh:79
ArmISA::DataX1Reg2ImmOp
Definition: data64.hh:147
ArmISA::DataXSRegOp::shiftType
ArmShiftType shiftType
Definition: data64.hh:84
ArmISA::DataX1RegOp
Definition: data64.hh:117
ArmISA::DataX2RegImmOp::dest
IntRegIndex dest
Definition: data64.hh:182
ArmISA::DataXCondSelOp::dest
IntRegIndex dest
Definition: data64.hh:252
ArmISA::DataX3RegOp::DataX3RegOp
DataX3RegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _op3)
Definition: data64.hh:201
ArmISA::DataX1Reg2ImmOp::dest
IntRegIndex dest
Definition: data64.hh:150
ArmISA::DataXImmOnlyOp::DataXImmOnlyOp
DataXImmOnlyOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, uint64_t _imm)
Definition: data64.hh:69

Generated on Wed Sep 30 2020 14:02:00 for gem5 by doxygen 1.8.17