gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  * Authors: Gabe Black
38  */
39 
40 #include "arch/arm/insts/data64.hh"
41 
42 namespace ArmISA
43 {
44 
45 std::string
47 {
48  std::stringstream ss;
49  printDataInst(ss, true, false, /*XXX not really s*/ false, dest, op1,
51  return ss.str();
52 }
53 
54 std::string
56 {
57  std::stringstream ss;
58  printMnemonic(ss, "", false);
59  printReg(ss, dest);
60  ccprintf(ss, ", #%d", imm);
61  return ss.str();
62 }
63 
64 std::string
66 {
67  std::stringstream ss;
68  printDataInst(ss, false, true, /*XXX not really s*/ false, dest, op1,
70  return ss.str();
71 }
72 
73 std::string
75 {
76  std::stringstream ss;
77  printDataInst(ss, false, true, /*XXX not really s*/ false, dest, op1,
78  op2, INTREG_ZERO, shiftAmt, LSL, 0);
79  return ss.str();
80 }
81 
82 std::string
84 {
85  std::stringstream ss;
86  printMnemonic(ss, "", false);
87  printReg(ss, dest);
88  ccprintf(ss, ", ");
89  printReg(ss, op1);
90  return ss.str();
91 }
92 
93 std::string
95 {
96  std::stringstream ss;
97  printMnemonic(ss, "", false);
98  printReg(ss, dest);
99  ccprintf(ss, ", ");
100  printReg(ss, op1);
101  ccprintf(ss, ", #%d", imm);
102  return ss.str();
103 }
104 
105 std::string
107 {
108  std::stringstream ss;
109  printMnemonic(ss, "", false);
110  printReg(ss, dest);
111  ccprintf(ss, ", ");
112  printReg(ss, op1);
113  ccprintf(ss, ", #%d, #%d", imm1, imm2);
114  return ss.str();
115 }
116 
117 std::string
119 {
120  std::stringstream ss;
121  printMnemonic(ss, "", false);
122  printReg(ss, dest);
123  ccprintf(ss, ", ");
124  printReg(ss, op1);
125  ccprintf(ss, ", ");
126  printReg(ss, op2);
127  return ss.str();
128 }
129 
130 std::string
132 {
133  std::stringstream ss;
134  printMnemonic(ss, "", false);
135  printReg(ss, dest);
136  ccprintf(ss, ", ");
137  printReg(ss, op1);
138  ccprintf(ss, ", ");
139  printReg(ss, op2);
140  ccprintf(ss, ", #%d", imm);
141  return ss.str();
142 }
143 
144 std::string
146 {
147  std::stringstream ss;
148  printMnemonic(ss, "", false);
149  printReg(ss, dest);
150  ccprintf(ss, ", ");
151  printReg(ss, op1);
152  ccprintf(ss, ", ");
153  printReg(ss, op2);
154  ccprintf(ss, ", ");
155  printReg(ss, op3);
156  return ss.str();
157 }
158 
159 std::string
161  Addr pc, const SymbolTable *symtab) const
162 {
163  std::stringstream ss;
164  printMnemonic(ss, "", false);
165  printReg(ss, op1);
166  ccprintf(ss, ", #%d, #%d", imm, defCc);
167  ccprintf(ss, ", ");
168  printCondition(ss, condCode, true);
169  return ss.str();
170 }
171 
172 std::string
174  Addr pc, const SymbolTable *symtab) const
175 {
176  std::stringstream ss;
177  printMnemonic(ss, "", false);
178  printReg(ss, op1);
179  ccprintf(ss, ", ");
180  printReg(ss, op2);
181  ccprintf(ss, ", #%d", defCc);
182  ccprintf(ss, ", ");
183  printCondition(ss, condCode, true);
184  return ss.str();
185 }
186 
187 std::string
189  Addr pc, const SymbolTable *symtab) const
190 {
191  std::stringstream ss;
192  printMnemonic(ss, "", false);
193  printReg(ss, dest);
194  ccprintf(ss, ", ");
195  printReg(ss, op1);
196  ccprintf(ss, ", ");
197  printReg(ss, op2);
198  ccprintf(ss, ", ");
199  printCondition(ss, condCode, true);
200  return ss.str();
201 }
202 
203 }
IntRegIndex dest
Definition: data64.hh:241
void ccprintf(cp::Print &print)
Definition: cprintf.hh:130
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:118
ConditionCode condCode
Definition: data64.hh:242
IntRegIndex dest
Definition: data64.hh:66
IntRegIndex op1
Definition: data64.hh:175
IntRegIndex dest
Definition: data64.hh:191
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:83
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:145
void printDataInst(std::ostream &os, bool withImm) const
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:74
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:55
int32_t shiftAmt
Definition: data64.hh:82
IntRegIndex dest
Definition: data64.hh:81
void printCondition(std::ostream &os, unsigned code, bool noImplicit=false) const
Definition: static_inst.cc:384
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) const
Definition: static_inst.cc:345
IntRegIndex dest
Definition: data64.hh:99
void printReg(std::ostream &os, int reg) const
Print a register name for disassembly given the unique dependence tag number (FP or int)...
Definition: static_inst.cc:296
ArmShiftType shiftType
Definition: data64.hh:83
IntRegIndex op2
Definition: data64.hh:241
IntRegIndex op1
Definition: data64.hh:99
IntRegIndex op2
Definition: data64.hh:175
int32_t shiftAmt
Definition: data64.hh:101
IntRegIndex op1
Definition: data64.hh:51
IntRegIndex dest
Definition: data64.hh:145
IntRegIndex op2
Definition: data64.hh:161
ConditionCode condCode
Definition: data64.hh:225
IntRegIndex op3
Definition: data64.hh:191
IntRegIndex op1
Definition: data64.hh:81
Bitfield< 21 > ss
Definition: miscregs.hh:1371
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
IntRegIndex op1
Definition: data64.hh:161
ConditionCode condCode
Definition: data64.hh:208
IntRegIndex dest
Definition: data64.hh:161
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:131
IntRegIndex dest
Definition: data64.hh:130
IntRegIndex op2
Definition: data64.hh:99
IntRegIndex dest
Definition: data64.hh:51
IntRegIndex op1
Definition: data64.hh:117
uint64_t imm
Definition: data64.hh:52
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:106
IntRegIndex op1
Definition: data64.hh:241
IntRegIndex dest
Definition: data64.hh:117
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:173
IntRegIndex op1
Definition: data64.hh:191
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:46
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:160
IntRegIndex dest
Definition: data64.hh:175
IntReg pc
Definition: remote_gdb.hh:91
IntRegIndex op2
Definition: data64.hh:81
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:94
IntRegIndex op1
Definition: data64.hh:130
IntRegIndex op2
Definition: data64.hh:191
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:65
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition: data64.cc:188

Generated on Fri Jun 9 2017 13:03:38 for gem5 by doxygen 1.8.6