mem.isa (11726:11950d45640b) | mem.isa (11729:f37b5fcd66fe) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2015 RISC-V Foundation 4// Copyright (c) 2016 The University of Virginia 5// All rights reserved. 6// 7// Redistribution and use in source and binary forms, with or without 8// modification, are permitted provided that the following conditions are --- 349 unchanged lines hidden (view full) --- 358 359 if (fault == NoFault) { 360 %(memacc_code)s; 361 } 362 363 if (fault == NoFault) { 364 fault = writeMemAtomic(xc, traceData, Mem, EA, memAccessFlags, 365 &result); | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2015 RISC-V Foundation 4// Copyright (c) 2016 The University of Virginia 5// All rights reserved. 6// 7// Redistribution and use in source and binary forms, with or without 8// modification, are permitted provided that the following conditions are --- 349 unchanged lines hidden (view full) --- 358 359 if (fault == NoFault) { 360 %(memacc_code)s; 361 } 362 363 if (fault == NoFault) { 364 fault = writeMemAtomic(xc, traceData, Mem, EA, memAccessFlags, 365 &result); |
366 // RISC-V has the opposite convention gem5 has for success flags, 367 // so we invert the result here. 368 result = !result; |
|
366 } 367 368 if (fault == NoFault) { 369 %(postacc_code)s; 370 } 371 372 if (fault == NoFault) { 373 %(op_wb)s; --- 6 unchanged lines hidden (view full) --- 380def template StoreCondCompleteAcc {{ 381 Fault %(class_name)s::completeAcc(Packet *pkt, CPU_EXEC_CONTEXT *xc, 382 Trace::InstRecord *traceData) const 383 { 384 Fault fault = NoFault; 385 386 %(op_dest_decl)s; 387 | 369 } 370 371 if (fault == NoFault) { 372 %(postacc_code)s; 373 } 374 375 if (fault == NoFault) { 376 %(op_wb)s; --- 6 unchanged lines hidden (view full) --- 383def template StoreCondCompleteAcc {{ 384 Fault %(class_name)s::completeAcc(Packet *pkt, CPU_EXEC_CONTEXT *xc, 385 Trace::InstRecord *traceData) const 386 { 387 Fault fault = NoFault; 388 389 %(op_dest_decl)s; 390 |
388 uint64_t result = pkt->req->getExtraData(); | 391 // RISC-V has the opposite convention gem5 has for success flags, 392 // so we invert the result here. 393 uint64_t result = !pkt->req->getExtraData(); |
389 390 if (fault == NoFault) { 391 %(postacc_code)s; 392 } 393 394 if (fault == NoFault) { 395 %(op_wb)s; 396 } --- 40 unchanged lines hidden --- | 394 395 if (fault == NoFault) { 396 %(postacc_code)s; 397 } 398 399 if (fault == NoFault) { 400 %(op_wb)s; 401 } --- 40 unchanged lines hidden --- |