Deleted Added
sdiff udiff text old ( 3349:fec4a86fa212 ) new ( 3953:300d526414e6 )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2006 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

161}};
162
163
164def template CompleteAccDeclare {{
165 Fault completeAcc(PacketPtr, %(CPU_exec_context)s *, Trace::InstRecord *) const;
166}};
167
168
169def template LoadStoreConstructor {{
170 /** TODO: change op_class to AddrGenOp or something (requires
171 * creating new member of OpClass enum in op_class.hh, updating
172 * config files, etc.). */
173 inline %(class_name)s::EAComp::EAComp(MachInst machInst)
174 : %(base_class)s("%(mnemonic)s (EAComp)", machInst, IntAluOp)
175 {
176 %(ea_constructor)s;
177 }
178
179 inline %(class_name)s::MemAcc::MemAcc(MachInst machInst)
180 : %(base_class)s("%(mnemonic)s (MemAcc)", machInst, %(op_class)s)
181 {
182 %(memacc_constructor)s;
183 }
184
185 inline %(class_name)s::%(class_name)s(MachInst machInst)
186 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
187 new EAComp(machInst), new MemAcc(machInst))
188 {
189 %(constructor)s;
190 }
191}};
192

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

197 Trace::InstRecord *traceData) const
198 {
199 Addr EA;
200 Fault fault = NoFault;
201
202 %(fp_enable_check)s;
203 %(op_decl)s;
204 %(op_rd)s;
205 %(code)s;
206
207 if (fault == NoFault) {
208 %(op_wb)s;
209 xc->setEA(EA);
210 }
211
212 return fault;
213 }

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

223
224 %(fp_enable_check)s;
225 %(op_decl)s;
226 %(op_rd)s;
227 EA = xc->getEA();
228
229 if (fault == NoFault) {
230 fault = xc->read(EA, (uint%(mem_acc_size)d_t&)Mem, memAccessFlags);
231 %(code)s;
232 }
233
234 if (fault == NoFault) {
235 %(op_wb)s;
236 }
237
238 return fault;
239 }

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

322 uint64_t write_result = 0;
323
324 %(fp_enable_check)s;
325 %(op_decl)s;
326 %(op_rd)s;
327 EA = xc->getEA();
328
329 if (fault == NoFault) {
330 %(code)s;
331 }
332
333 if (fault == NoFault) {
334 fault = xc->write((uint%(mem_acc_size)d_t&)Mem, EA,
335 memAccessFlags, &write_result);
336 if (traceData) { traceData->setData(Mem); }
337 }
338

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

466 Fault fault = NoFault;
467
468 %(fp_enable_check)s;
469 %(op_decl)s;
470 %(op_rd)s;
471 EA = xc->getEA();
472
473 if (fault == NoFault) {
474 %(code)s;
475 }
476
477 return NoFault;
478 }
479}};
480
481def template MiscExecute {{
482 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,

--- 122 unchanged lines hidden ---