sim: Make PortProxy args in BaseBufferArg const ref.

That allows us to pass temporaries as the PortProxy arguments to these
functions. The thing behind the proxy may need to change, but the proxy
itself does not.

Change-Id: Ia9e09753b653107491cc12aa965e3662550208d1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45906
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Gabe Black
2021-05-23 02:04:42 -07:00
parent fc3e7214de
commit b34d73af27

View File

@@ -75,7 +75,7 @@ class BaseBufferArg
* copy data into simulator space (read from target memory)
*/
bool
copyIn(PortProxy &memproxy)
copyIn(const PortProxy &memproxy)
{
memproxy.readBlob(addr, bufPtr, size);
return true; // no EFAULT detection for now
@@ -85,7 +85,7 @@ class BaseBufferArg
* copy data out of simulator space (write to target memory)
*/
bool
copyOut(PortProxy &memproxy)
copyOut(const PortProxy &memproxy)
{
memproxy.writeBlob(addr, bufPtr, size);
return true; // no EFAULT detection for now