summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/inorder/resources')
-rw-r--r--src/cpu/inorder/resources/cache_unit.cc12
-rw-r--r--src/cpu/inorder/resources/fetch_unit.cc2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cpu/inorder/resources/cache_unit.cc b/src/cpu/inorder/resources/cache_unit.cc
index 251369e01..3a44986e2 100644
--- a/src/cpu/inorder/resources/cache_unit.cc
+++ b/src/cpu/inorder/resources/cache_unit.cc
@@ -68,7 +68,7 @@ using namespace ThePipeline;
#if TRACING_ON
static std::string
-printMemData(uint8_t *data, unsigned size)
+printMemData(const uint8_t *data, unsigned size)
{
std::stringstream dataStr;
for (unsigned pos = 0; pos < size; pos++) {
@@ -855,7 +855,7 @@ CacheUnit::doCacheAccess(DynInstPtr inst, uint64_t *write_res,
DPRINTF(InOrderCachePort,
"[tid:%u]: [sn:%i]: Storing data: %s\n",
tid, inst->seqNum,
- printMemData(cache_req->dataPkt->getPtr<uint8_t>(),
+ printMemData(cache_req->dataPkt->getConstPtr<uint8_t>(),
cache_req->dataPkt->getSize()));
if (mem_req->isCondSwap()) {
@@ -1061,9 +1061,9 @@ CacheUnit::processCacheCompletion(PacketPtr pkt)
DPRINTF(InOrderCachePort,
"[tid:%u]: [sn:%i]: Bytes loaded were: %s\n",
tid, inst->seqNum,
- (split_pkt) ? printMemData(split_pkt->getPtr<uint8_t>(),
+ (split_pkt) ? printMemData(split_pkt->getConstPtr<uint8_t>(),
split_pkt->getSize()) :
- printMemData(cache_pkt->getPtr<uint8_t>(),
+ printMemData(cache_pkt->getConstPtr<uint8_t>(),
cache_pkt->getSize()));
} else if(inst->isStore()) {
assert(cache_pkt->isWrite());
@@ -1071,9 +1071,9 @@ CacheUnit::processCacheCompletion(PacketPtr pkt)
DPRINTF(InOrderCachePort,
"[tid:%u]: [sn:%i]: Bytes stored were: %s\n",
tid, inst->seqNum,
- (split_pkt) ? printMemData(split_pkt->getPtr<uint8_t>(),
+ (split_pkt) ? printMemData(split_pkt->getConstPtr<uint8_t>(),
split_pkt->getSize()) :
- printMemData(cache_pkt->getPtr<uint8_t>(),
+ printMemData(cache_pkt->getConstPtr<uint8_t>(),
cache_pkt->getSize()));
}
diff --git a/src/cpu/inorder/resources/fetch_unit.cc b/src/cpu/inorder/resources/fetch_unit.cc
index 6892688b2..13864e589 100644
--- a/src/cpu/inorder/resources/fetch_unit.cc
+++ b/src/cpu/inorder/resources/fetch_unit.cc
@@ -503,7 +503,7 @@ FetchUnit::processCacheCompletion(PacketPtr pkt)
// Copy Data to pendingFetch queue...
(*pend_it)->block = new uint8_t[cacheBlkSize];
- memcpy((*pend_it)->block, cache_pkt->getPtr<uint8_t>(), cacheBlkSize);
+ memcpy((*pend_it)->block, cache_pkt->getConstPtr<uint8_t>(), cacheBlkSize);
(*pend_it)->valid = true;
cache_req->setMemAccPending(false);