From 9779ba2e37a753df407b976fc4b299d936ea62b8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 2 Dec 2014 06:07:36 -0500 Subject: mem: Add const getters for write packet data This patch takes a first step in tightening up how we use the data pointer in write packets. A const getter is added for the pointer itself (getConstPtr), and a number of member functions are also made const accordingly. In a range of places throughout the memory system the new member is used. The patch also removes the unused isReadWrite function. --- src/cpu/minor/execute.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/minor/execute.cc') diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index 123128358..69cb9a239 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -355,7 +355,7 @@ Execute::handleMemResponse(MinorDynInstPtr inst, if (is_load && packet->getSize() > 0) { DPRINTF(MinorMem, "Memory data[0]: 0x%x\n", - static_cast(packet->getPtr()[0])); + static_cast(packet->getConstPtr()[0])); } /* Complete the memory access instruction */ -- cgit v1.2.3