From 230b892fa3f484a46f4cd77f889f8793416b91e2 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 18 Oct 2018 17:34:08 -0700 Subject: arch: cpu: Stop passing around misc registers by reference. These values are all basic integers (specifically uint64_t now), and so passing them by const & is actually less efficient since there's a extra level of indirection and an extra value, and the same sized value (a 64 bit pointer vs. a 64 bit int) is being passed around. Change-Id: Ie9956b8dc4c225068ab1afaba233ec2b42b76da3 Reviewed-on: https://gem5-review.googlesource.com/c/13626 Maintainer: Gabe Black Reviewed-by: Jason Lowe-Power --- src/cpu/simple/exec_context.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cpu/simple') diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh index aa6ee8ba3..7db7d20d9 100644 --- a/src/cpu/simple/exec_context.hh +++ b/src/cpu/simple/exec_context.hh @@ -361,8 +361,7 @@ class SimpleExecContext : public ExecContext { } void - setMiscRegOperand(const StaticInst *si, int idx, - const RegVal &val) override + setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override { numIntRegWrites++; const RegId& reg = si->destRegIdx(idx); @@ -386,7 +385,7 @@ class SimpleExecContext : public ExecContext { * side effects due to writing that register. */ void - setMiscReg(int misc_reg, const RegVal &val) override + setMiscReg(int misc_reg, RegVal val) override { numIntRegWrites++; thread->setMiscReg(misc_reg, val); -- cgit v1.2.3