summaryrefslogtreecommitdiff
path: root/src/mem/se_translating_port_proxy.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-12-02 06:07:38 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2014-12-02 06:07:38 -0500
commit0706a252031b3f160bac65fac00b22f8a5ebf4f9 (patch)
tree7f34dd2ef0a6d19fa5f5e1e43268d0be9a0963bb /src/mem/se_translating_port_proxy.hh
parent9779ba2e37a753df407b976fc4b299d936ea62b8 (diff)
downloadgem5-0706a252031b3f160bac65fac00b22f8a5ebf4f9.tar.xz
mem: Use const pointers for port proxy write functions
This patch changes the various write functions in the port proxies to use const pointers for all sources (similar to how memcpy works). The one unfortunate aspect is the need for a const_cast in the packet, to avoid having to juggle a const and a non-const data pointer. This design decision can always be re-evaluated at a later stage.
Diffstat (limited to 'src/mem/se_translating_port_proxy.hh')
-rw-r--r--src/mem/se_translating_port_proxy.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/se_translating_port_proxy.hh b/src/mem/se_translating_port_proxy.hh
index 99973a6e9..58d0c9bcd 100644
--- a/src/mem/se_translating_port_proxy.hh
+++ b/src/mem/se_translating_port_proxy.hh
@@ -84,13 +84,13 @@ class SETranslatingPortProxy : public PortProxy
virtual ~SETranslatingPortProxy();
bool tryReadBlob(Addr addr, uint8_t *p, int size) const;
- bool tryWriteBlob(Addr addr, uint8_t *p, int size) const;
+ bool tryWriteBlob(Addr addr, const uint8_t *p, int size) const;
bool tryMemsetBlob(Addr addr, uint8_t val, int size) const;
bool tryWriteString(Addr addr, const char *str) const;
bool tryReadString(std::string &str, Addr addr) const;
virtual void readBlob(Addr addr, uint8_t *p, int size) const;
- virtual void writeBlob(Addr addr, uint8_t *p, int size) const;
+ virtual void writeBlob(Addr addr, const uint8_t *p, int size) const;
virtual void memsetBlob(Addr addr, uint8_t val, int size) const;
void writeString(Addr addr, const char *str) const;