diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:49:40 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:49:40 -0500 |
commit | fd8a4ff5a8a9ea65e227f0b4000dfcda06d4764f (patch) | |
tree | ce2a5d4e12142eab64231daab73953a15384b7c6 /src/mem/cache/miss/blocking_buffer.cc | |
parent | 8561c8366c7c9afd7e6b52b6e2385b3c1dde95a9 (diff) | |
parent | 63fdabf191b8ac1031fb25da61ab2526d4bb6d05 (diff) | |
download | gem5-fd8a4ff5a8a9ea65e227f0b4000dfcda06d4764f.tar.xz |
Merge zeep.pool:/z/saidi/work/m5.newmem
into zeep.pool:/z/saidi/work/m5.suncc
--HG--
extra : convert_revision : 20f61a524a3b53fc0afcf53a24b5a1fe1d96f579
Diffstat (limited to 'src/mem/cache/miss/blocking_buffer.cc')
-rw-r--r-- | src/mem/cache/miss/blocking_buffer.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/cache/miss/blocking_buffer.cc b/src/mem/cache/miss/blocking_buffer.cc index 4a431d82d..a1af88341 100644 --- a/src/mem/cache/miss/blocking_buffer.cc +++ b/src/mem/cache/miss/blocking_buffer.cc @@ -32,6 +32,7 @@ * @file * Definitions of a simple buffer for a blocking cache. */ +#include <cstring> #include "mem/cache/base_cache.hh" #include "mem/cache/miss/blocking_buffer.hh" @@ -60,7 +61,7 @@ BlockingBuffer::handleMiss(PacketPtr &pkt, int blk_size, Tick time) wb.allocate(pkt->cmd, blk_addr, blk_size, pkt); } - memcpy(wb.pkt->getPtr<uint8_t>(), pkt->getPtr<uint8_t>(), blk_size); + std::memcpy(wb.pkt->getPtr<uint8_t>(), pkt->getPtr<uint8_t>(), blk_size); cache->setBlocked(Blocked_NoWBBuffers); cache->setMasterRequest(Request_WB, time); @@ -147,7 +148,7 @@ BlockingBuffer::handleResponse(PacketPtr &pkt, Tick time) PacketPtr target = ((MSHR*)(pkt->senderState))->getTarget(); ((MSHR*)(pkt->senderState))->popTarget(); if (pkt->isRead()) { - memcpy(target->getPtr<uint8_t>(), pkt->getPtr<uint8_t>(), target->getSize()); + std::memcpy(target->getPtr<uint8_t>(), pkt->getPtr<uint8_t>(), target->getSize()); } cache->respond(target, time); assert(!((MSHR*)(pkt->senderState))->hasTargets()); @@ -191,7 +192,7 @@ BlockingBuffer::doWriteback(Addr addr, PacketPtr pkt = new Packet(req, Packet::Writeback, -1); pkt->allocate(); if (data) { - memcpy(pkt->getPtr<uint8_t>(), data, size); + std::memcpy(pkt->getPtr<uint8_t>(), data, size); } if (compressed) { @@ -217,7 +218,7 @@ BlockingBuffer::doWriteback(PacketPtr &pkt) // Since allocate as buffer copies the request, // need to copy data here. - memcpy(wb.pkt->getPtr<uint8_t>(), pkt->getPtr<uint8_t>(), pkt->getSize()); + std::memcpy(wb.pkt->getPtr<uint8_t>(), pkt->getPtr<uint8_t>(), pkt->getSize()); cache->setBlocked(Blocked_NoWBBuffers); cache->setMasterRequest(Request_WB, curTick); |