Trace::InstRecord *traceData) const
{
Addr EA;
- Fault fault = NoFault;
%(op_decl)s;
%(op_rd)s;
%(ea_code)s;
%(usrDecl)s;
- if (fault == NoFault) {
- %(memacc_code)s;
- }
- %(amo_code)s
+ %(memacc_code)s;
+
+ %(amo_code)s;
assert(amo_op);
- if (fault == NoFault) {
- fault = amoMemAtomic(xc, traceData, Mem, EA,
- memAccessFlags, amo_op);
- }
+ const Fault fault = amoMemAtomic(xc, traceData, Mem, EA,
+ memAccessFlags, amo_op);
if (fault == NoFault) {
%(postacc_code)s;
- }
-
- if (fault == NoFault) {
%(op_wb)s;
}
- return fault;
+ return fault;
}
}};
Trace::InstRecord *traceData) const
{
Addr EA;
- Fault fault = NoFault;
%(op_src_decl)s;
%(op_rd)s;
%(ea_code)s;
%(usrDecl)s;
- if (fault == NoFault) {
- %(memacc_code)s;
- }
+ %(memacc_code)s;
%(amo_code)s;
assert(amo_op);
- if (fault == NoFault) {
- fault = initiateMemAMO(xc, traceData, EA, Mem, memAccessFlags,
- amo_op);
- }
-
- return fault;
+ return initiateMemAMO(xc, traceData, EA, Mem, memAccessFlags,
+ amo_op);
}
}};
Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
Trace::InstRecord *traceData) const
{
- Fault fault = NoFault;
-
- %(op_decl)s;
- %(op_rd)s;
+ %(op_decl)s;
+ %(op_rd)s;
// ARM instructions will not have a pkt if the predicate is false
getMem(pkt, Mem, traceData);
- if (fault == NoFault) {
- %(postacc_code)s;
- }
+ %(postacc_code)s;
- if (fault == NoFault) {
- %(op_wb)s;
- }
+ %(op_wb)s;
- return fault;
+ return NoFault;
}
}};