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

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

76 %(class_name)s(ExtMachInst _machInst,
77 const char * instMnem, uint64_t setFlags,
78 uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
79 uint64_t _disp, InstRegIndex _segment,
80 InstRegIndex _data,
81 uint8_t _dataSize, uint8_t _addressSize,
82 Request::FlagsType _memFlags);
83
84 %(BasicExecDeclare)s
84 Fault execute(ExecContext *, Trace::InstRecord *) const;
85 };
86}};
87
88// Load templates
89
90def template MicroLoadExecute {{
91 Fault %(class_name)s::execute(ExecContext *xc,
92 Trace::InstRecord *traceData) const

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

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
226def template MicroLdStOpDeclare {{
227 class %(class_name)s : public %(base_class)s
228 {
229 public:
230 %(class_name)s(ExtMachInst _machInst,
231 const char * instMnem, uint64_t setFlags,
232 uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
233 uint64_t _disp, InstRegIndex _segment,
234 InstRegIndex _data,
235 uint8_t _dataSize, uint8_t _addressSize,
236 Request::FlagsType _memFlags);
237
250 %(BasicExecDeclare)s
251
252 %(InitiateAccDeclare)s
253
254 %(CompleteAccDeclare)s
238 Fault execute(ExecContext *, Trace::InstRecord *) const;
239 Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
240 Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
241 };
242}};
243
244// LdStSplitOp is a load or store that uses a pair of regs as the
245// source or destination. Used for cmpxchg{8,16}b.
246def template MicroLdStSplitOpDeclare {{
247 class %(class_name)s : public %(base_class)s
248 {
249 public:
250 %(class_name)s(ExtMachInst _machInst,
251 const char * instMnem, uint64_t setFlags,
252 uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
253 uint64_t _disp, InstRegIndex _segment,
254 InstRegIndex _dataLow, InstRegIndex _dataHi,
255 uint8_t _dataSize, uint8_t _addressSize,
256 Request::FlagsType _memFlags);
257
272 %(BasicExecDeclare)s
273
274 %(InitiateAccDeclare)s
275
276 %(CompleteAccDeclare)s
258 Fault execute(ExecContext *, Trace::InstRecord *) const;
259 Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
260 Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
261 };
262}};
263
264def template MicroLdStOpConstructor {{
265 %(class_name)s::%(class_name)s(
266 ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
267 uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
268 uint64_t _disp, InstRegIndex _segment,

--- 485 unchanged lines hidden ---