From b34d73af2755d2dcdbfcc9a0c7ede71bb24d7949 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 23 May 2021 02:04:42 -0700 Subject: [PATCH] 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 Reviewed-by: Daniel Carvalho Maintainer: Gabe Black --- src/sim/syscall_emul_buf.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sim/syscall_emul_buf.hh b/src/sim/syscall_emul_buf.hh index 2a79ccdb62..8e2f3ac26e 100644 --- a/src/sim/syscall_emul_buf.hh +++ b/src/sim/syscall_emul_buf.hh @@ -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