Deleted Added
sdiff udiff text old ( 12236:126ac9da6050 ) new ( 12385:288c62455dde )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2005 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

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

125 class %(class_name)s : public %(base_class)s
126 {
127 public:
128
129 /// Constructor.
130 %(class_name)s(ExtMachInst machInst);
131
132 Fault execute(ExecContext *, Trace::InstRecord *) const;
133 Fault eaComp(ExecContext *, Trace::InstRecord *) const;
134 Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
135 Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
136 };
137}};
138
139def template LoadStoreConstructor {{
140 %(class_name)s::%(class_name)s(ExtMachInst machInst)
141 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
142 {
143 %(constructor)s;
144 }
145}};
146
147def template EACompExecute {{
148 Fault %(class_name)s::eaComp(ExecContext *xc,
149 Trace::InstRecord *traceData) const
150 {
151 Addr EA;
152 Fault fault = NoFault;
153
154 %(fp_enable_check)s;
155 %(op_decl)s;
156 %(op_rd)s;
157 %(ea_code)s;
158
159 if (fault == NoFault) {
160 %(op_wb)s;
161 xc->setEA(EA);
162 }
163
164 return fault;
165 }
166}};
167
168
169def template LoadExecute {{
170 Fault %(class_name)s::execute(ExecContext *xc,
171 Trace::InstRecord *traceData) const
172 {
173 Addr EA;
174 Fault fault = NoFault;
175
176 %(fp_enable_check)s;

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

462 initiateAccTemplate = eval(exec_template_base + 'InitiateAcc')
463 completeAccTemplate = eval(exec_template_base + 'CompleteAcc')
464
465 # (header_output, decoder_output, decode_block, exec_output)
466 return (LoadStoreDeclare.subst(iop),
467 LoadStoreConstructor.subst(iop),
468 decode_template.subst(iop),
469 fullExecTemplate.subst(iop)
470 + EACompExecute.subst(iop)
471 + initiateAccTemplate.subst(iop)
472 + completeAccTemplate.subst(iop))
473}};
474
475def format LoadOrNop(memacc_code, ea_code = {{ EA = Rb + disp; }},
476 mem_flags = [], inst_flags = []) {{
477 (header_output, decoder_output, decode_block, exec_output) = \
478 LoadStoreBase(name, Name, ea_code, memacc_code, mem_flags, inst_flags,

--- 60 unchanged lines hidden ---