2a3,14
> // Copyright (c) 2010 ARM Limited
> // All rights reserved
> //
> // The license below extends only to copyright in the software and shall
> // not be construed as granting a license to any other intellectual
> // property including but not limited to intellectual property relating
> // to a hardware implementation of the functionality of the software
> // licensed hereunder. You may use the software subject to the license
> // terms below provided that you ensure that this notice is replicated
> // unmodified and in its entirety in all distributions of the software,
> // modified or unmodified, in source code or in binary form.
> //
58a71,135
> def template StoreExecute {{
> Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
> Trace::InstRecord *traceData) const
> {
> Addr EA;
> Fault fault = NoFault;
>
> %(op_decl)s;
> %(op_rd)s;
> %(ea_code)s;
>
> if (%(predicate_test)s)
> {
> if (fault == NoFault) {
> %(memacc_code)s;
> }
>
> if (fault == NoFault) {
> fault = xc->write((uint%(mem_acc_size)d_t&)Mem, EA,
> memAccessFlags, NULL);
> if (traceData) { traceData->setData(Mem); }
> }
>
> if (fault == NoFault) {
> %(op_wb)s;
> }
> }
>
> return fault;
> }
> }};
>
> def template StoreInitiateAcc {{
> Fault %(class_name)s::initiateAcc(%(CPU_exec_context)s *xc,
> Trace::InstRecord *traceData) const
> {
> Addr EA;
> Fault fault = NoFault;
>
> %(op_decl)s;
> %(op_rd)s;
> %(ea_code)s;
>
> if (%(predicate_test)s)
> {
> if (fault == NoFault) {
> %(memacc_code)s;
> }
>
> if (fault == NoFault) {
> fault = xc->write((uint%(mem_acc_size)d_t&)Mem, EA,
> memAccessFlags, NULL);
> if (traceData) { traceData->setData(Mem); }
> }
>
> // Need to write back any potential address register update
> if (fault == NoFault) {
> %(op_wb)s;
> }
> }
>
> return fault;
> }
> }};
>
108a186,206
> def template StoreCompleteAcc {{
> Fault %(class_name)s::completeAcc(PacketPtr pkt,
> %(CPU_exec_context)s *xc,
> Trace::InstRecord *traceData) const
> {
> Fault fault = NoFault;
>
> %(op_decl)s;
> %(op_rd)s;
>
> if (%(predicate_test)s)
> {
> if (fault == NoFault) {
> %(op_wb)s;
> }
> }
>
> return fault;
> }
> }};
>