diff options
-rw-r--r-- | src/arch/arm/isa/templates/mem64.isa | 48 |
1 files changed, 14 insertions, 34 deletions
diff --git a/src/arch/arm/isa/templates/mem64.isa b/src/arch/arm/isa/templates/mem64.isa index e5df80155..3d0302a73 100644 --- a/src/arch/arm/isa/templates/mem64.isa +++ b/src/arch/arm/isa/templates/mem64.isa @@ -737,34 +737,27 @@ def template AmoOpExecute {{ 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; } }}; @@ -773,26 +766,19 @@ def template AmoOpInitiateAcc {{ 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); } }}; @@ -800,23 +786,17 @@ def template AmoOpCompleteAcc {{ 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; } }}; |