Deleted Added
sdiff udiff text old ( 11829:cb5390385d87 ) new ( 12234:78ece221f9f5 )
full compact
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2// Copyright (c) 2015 Advanced Micro Devices, Inc.
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

--- 34 unchanged lines hidden (view full) ---

43//
44// LdStOp Microop templates
45//
46//////////////////////////////////////////////////////////////////////////
47
48// LEA template
49
50def template MicroLeaExecute {{
51 Fault %(class_name)s::execute(ExecContext *xc,
52 Trace::InstRecord *traceData) const
53 {
54 Fault fault = NoFault;
55 Addr EA;
56
57 %(op_decl)s;
58 %(op_rd)s;
59 %(ea_code)s;

--- 23 unchanged lines hidden (view full) ---

83
84 %(BasicExecDeclare)s
85 };
86}};
87
88// Load templates
89
90def template MicroLoadExecute {{
91 Fault %(class_name)s::execute(ExecContext *xc,
92 Trace::InstRecord *traceData) const
93 {
94 Fault fault = NoFault;
95 Addr EA;
96
97 %(op_decl)s;
98 %(op_rd)s;
99 %(ea_code)s;

--- 13 unchanged lines hidden (view full) ---

113 %(op_wb)s;
114 }
115
116 return fault;
117 }
118}};
119
120def template MicroLoadInitiateAcc {{
121 Fault %(class_name)s::initiateAcc(ExecContext * xc,
122 Trace::InstRecord * traceData) const
123 {
124 Fault fault = NoFault;
125 Addr EA;
126
127 %(op_decl)s;
128 %(op_rd)s;
129 %(ea_code)s;
130 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
131
132 fault = initiateMemRead(xc, traceData, EA,
133 %(memDataSize)s, memFlags);
134
135 return fault;
136 }
137}};
138
139def template MicroLoadCompleteAcc {{
140 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext * xc,
141 Trace::InstRecord * traceData) const
142 {
143 Fault fault = NoFault;
144
145 %(op_decl)s;
146 %(op_rd)s;
147
148 getMem(pkt, Mem, %(memDataSize)s, traceData);
149

--- 6 unchanged lines hidden (view full) ---

156
157 return fault;
158 }
159}};
160
161// Store templates
162
163def template MicroStoreExecute {{
164 Fault %(class_name)s::execute(ExecContext * xc,
165 Trace::InstRecord *traceData) const
166 {
167 Fault fault = NoFault;
168
169 Addr EA;
170 %(op_decl)s;
171 %(op_rd)s;
172 %(ea_code)s;

--- 11 unchanged lines hidden (view full) ---

184 }
185 }
186
187 return fault;
188 }
189}};
190
191def template MicroStoreInitiateAcc {{
192 Fault %(class_name)s::initiateAcc(ExecContext * xc,
193 Trace::InstRecord * traceData) const
194 {
195 Fault fault = NoFault;
196
197 Addr EA;
198 %(op_decl)s;
199 %(op_rd)s;
200 %(ea_code)s;

--- 7 unchanged lines hidden (view full) ---

208 memFlags, NULL);
209 }
210 return fault;
211 }
212}};
213
214def template MicroStoreCompleteAcc {{
215 Fault %(class_name)s::completeAcc(PacketPtr pkt,
216 ExecContext * xc, Trace::InstRecord * traceData) const
217 {
218 %(op_decl)s;
219 %(op_rd)s;
220 %(complete_code)s;
221 %(op_wb)s;
222 return NoFault;
223 }
224}};
225
226// Common templates
227
228//This delcares the initiateAcc function in memory operations
229def template InitiateAccDeclare {{
230 Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
231}};
232
233//This declares the completeAcc function in memory operations
234def template CompleteAccDeclare {{
235 Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
236}};
237
238def template MicroLdStOpDeclare {{
239 class %(class_name)s : public %(base_class)s
240 {
241 public:
242 %(class_name)s(ExtMachInst _machInst,
243 const char * instMnem, uint64_t setFlags,

--- 526 unchanged lines hidden ---