gem5  v20.1.0.0
data64.cc
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 #include "arch/arm/insts/data64.hh"
39 
40 namespace ArmISA
41 {
42 
43 std::string
45  Addr pc, const Loader::SymbolTable *symtab) const
46 {
47  std::stringstream ss;
48  printDataInst(ss, true, false, /*XXX not really s*/ false, dest, op1,
50  return ss.str();
51 }
52 
53 std::string
55  Addr pc, const Loader::SymbolTable *symtab) const
56 {
57  std::stringstream ss;
58  printMnemonic(ss, "", false);
60  ccprintf(ss, ", #%d", imm);
61  return ss.str();
62 }
63 
64 std::string
66  Addr pc, const Loader::SymbolTable *symtab) const
67 {
68  std::stringstream ss;
69  printDataInst(ss, false, true, /*XXX not really s*/ false, dest, op1,
71  return ss.str();
72 }
73 
74 std::string
76  Addr pc, const Loader::SymbolTable *symtab) const
77 {
78  std::stringstream ss;
79  printDataInst(ss, false, true, /*XXX not really s*/ false, dest, op1,
80  op2, INTREG_ZERO, shiftAmt, LSL, 0);
81  return ss.str();
82 }
83 
84 std::string
86  Addr pc, const Loader::SymbolTable *symtab) const
87 {
88  std::stringstream ss;
89  printMnemonic(ss, "", false);
91  ccprintf(ss, ", ");
92  printIntReg(ss, op1);
93  return ss.str();
94 }
95 
96 std::string
98  Addr pc, const Loader::SymbolTable *symtab) const
99 {
100  std::stringstream ss;
101  printMnemonic(ss, "", false);
102  printIntReg(ss, dest);
103  ccprintf(ss, ", ");
104  printIntReg(ss, op1);
105  ccprintf(ss, ", #%d", imm);
106  return ss.str();
107 }
108 
109 std::string
111  Addr pc, const Loader::SymbolTable *symtab) const
112 {
113  std::stringstream ss;
114  printMnemonic(ss, "", false);
115  printIntReg(ss, dest);
116  ccprintf(ss, ", ");
117  printIntReg(ss, op1);
118  ccprintf(ss, ", #%d, #%d", imm1, imm2);
119  return ss.str();
120 }
121 
122 std::string
124  Addr pc, const Loader::SymbolTable *symtab) const
125 {
126  std::stringstream ss;
127  printMnemonic(ss, "", false);
128  printIntReg(ss, dest);
129  ccprintf(ss, ", ");
130  printIntReg(ss, op1);
131  ccprintf(ss, ", ");
132  printIntReg(ss, op2);
133  return ss.str();
134 }
135 
136 std::string
138  Addr pc, const Loader::SymbolTable *symtab) const
139 {
140  std::stringstream ss;
141  printMnemonic(ss, "", false);
142  printIntReg(ss, dest);
143  ccprintf(ss, ", ");
144  printIntReg(ss, op1);
145  ccprintf(ss, ", ");
146  printIntReg(ss, op2);
147  ccprintf(ss, ", #%d", imm);
148  return ss.str();
149 }
150 
151 std::string
153  Addr pc, const Loader::SymbolTable *symtab) const
154 {
155  std::stringstream ss;
156  printMnemonic(ss, "", false);
157  printIntReg(ss, dest);
158  ccprintf(ss, ", ");
159  printIntReg(ss, op1);
160  ccprintf(ss, ", ");
161  printIntReg(ss, op2);
162  ccprintf(ss, ", ");
163  printIntReg(ss, op3);
164  return ss.str();
165 }
166 
167 std::string
169  Addr pc, const Loader::SymbolTable *symtab) const
170 {
171  std::stringstream ss;
172  printMnemonic(ss, "", false);
173  printIntReg(ss, op1);
174  ccprintf(ss, ", #%d, #%d", imm, defCc);
175  ccprintf(ss, ", ");
176  printCondition(ss, condCode, true);
177  return ss.str();
178 }
179 
180 std::string
182  Addr pc, const Loader::SymbolTable *symtab) const
183 {
184  std::stringstream ss;
185  printMnemonic(ss, "", false);
186  printIntReg(ss, op1);
187  ccprintf(ss, ", ");
188  printIntReg(ss, op2);
189  ccprintf(ss, ", #%d", defCc);
190  ccprintf(ss, ", ");
191  printCondition(ss, condCode, true);
192  return ss.str();
193 }
194 
195 std::string
197  Addr pc, const Loader::SymbolTable *symtab) const
198 {
199  std::stringstream ss;
200  printMnemonic(ss, "", false);
201  printIntReg(ss, dest);
202  ccprintf(ss, ", ");
203  printIntReg(ss, op1);
204  ccprintf(ss, ", ");
205  printIntReg(ss, op2);
206  ccprintf(ss, ", ");
207  printCondition(ss, condCode, true);
208  return ss.str();
209 }
210 
211 }
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::DataX3RegOp::op1
IntRegIndex op1
Definition: data64.hh:199
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::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::DataX1Reg2ImmOp::imm2
uint64_t imm2
Definition: data64.hh:151
Loader::SymbolTable
Definition: symtab.hh:59
ArmISA::DataX1RegImmOp::imm
uint64_t imm
Definition: data64.hh:135
ArmISA::INTREG_ZERO
@ INTREG_ZERO
Definition: intregs.hh:112
ArmISA::DataX1RegImmOp::dest
IntRegIndex dest
Definition: data64.hh:134
ArmISA::DataXCondCompRegOp::op1
IntRegIndex op1
Definition: data64.hh:234
ArmISA::ArmStaticInst::printIntReg
void printIntReg(std::ostream &os, RegIndex reg_idx, uint8_t opWidth=0) const
Print a register name for disassembly given the unique dependence tag number (FP or int).
Definition: static_inst.cc:296
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::DataX3RegOp::op3
IntRegIndex op3
Definition: data64.hh:199
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::DataX2RegImmOp::op2
IntRegIndex op2
Definition: data64.hh:182
ArmISA::DataXImmOnlyOp::dest
IntRegIndex dest
Definition: data64.hh:66
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::DataXImmOp::imm
uint64_t imm
Definition: data64.hh:51
ArmISA::ss
Bitfield< 21 > ss
Definition: miscregs_types.hh:56
ArmISA::DataX3RegOp::op2
IntRegIndex op2
Definition: data64.hh:199
ArmISA::DataXSRegOp::shiftAmt
int32_t shiftAmt
Definition: data64.hh:83
ArmISA::DataXERegOp::dest
IntRegIndex dest
Definition: data64.hh:101
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::LSL
@ LSL
Definition: types.hh:568
ArmISA::DataX2RegOp::dest
IntRegIndex dest
Definition: data64.hh:167
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::DataXERegOp::op2
IntRegIndex op2
Definition: data64.hh:101
ArmISA::DataX2RegImmOp::op1
IntRegIndex op1
Definition: data64.hh:182
data64.hh
ArmISA::ArmStaticInst::printCondition
void printCondition(std::ostream &os, unsigned code, bool noImplicit=false) const
Definition: static_inst.cc:414
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::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::ArmStaticInst::printDataInst
void printDataInst(std::ostream &os, bool withImm) const
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
ArmISA::ArmStaticInst::printMnemonic
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) const
Definition: static_inst.cc:374
ArmISA::DataXSRegOp::op2
IntRegIndex op2
Definition: data64.hh:82
ccprintf
void ccprintf(cp::Print &print)
Definition: cprintf.hh:127
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
ArmISA::DataXERegOp::shiftAmt
int32_t shiftAmt
Definition: data64.hh:103
ArmISA::DataXCondSelOp::op1
IntRegIndex op1
Definition: data64.hh:252
ArmISA::DataX1RegOp::dest
IntRegIndex dest
Definition: data64.hh:120
ArmISA::DataXSRegOp::shiftType
ArmShiftType shiftType
Definition: data64.hh:84
ArmISA::DataX2RegImmOp::dest
IntRegIndex dest
Definition: data64.hh:182
ArmISA::DataXCondSelOp::dest
IntRegIndex dest
Definition: data64.hh:252
ArmISA::DataX1Reg2ImmOp::dest
IntRegIndex dest
Definition: data64.hh:150

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