ldstop.isa (11829:cb5390385d87) ldstop.isa (12234:78ece221f9f5)
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 {{
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(CPU_EXEC_CONTEXT *xc,
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 {{
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(CPU_EXEC_CONTEXT *xc,
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 {{
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(CPU_EXEC_CONTEXT * xc,
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 {{
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,
141 CPU_EXEC_CONTEXT * xc,
142 Trace::InstRecord * traceData) const
140 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext * xc,
141 Trace::InstRecord * traceData) const
143 {
144 Fault fault = NoFault;
145
146 %(op_decl)s;
147 %(op_rd)s;
148
149 getMem(pkt, Mem, %(memDataSize)s, traceData);
150

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

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

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

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

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

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

--- 526 unchanged lines hidden ---
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 ---