arm: Use a const ThreadContext * and readMiscRegNoEffect in places.
authorGabe Black <gabeblack@google.com>
Wed, 26 Feb 2020 12:46:11 +0000 (04:46 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 27 Feb 2020 13:02:57 +0000 (13:02 +0000)
commit4d2272078fd2f130b8f14278af958bb76999a098
tree9c429b6021407e20e5c9363fcf5c787b7451c9ce
parent4f4fe6f80e8cbfcbf8f4a96a74643079e69e8295
arm: Use a const ThreadContext * and readMiscRegNoEffect in places.

Unlike readMiscReg, readMiscRegNoEffect won't have any read related
side effects and so can be used on a const ThreadContext. Also, using
a const ThreadContext * in a few functions which don't actually intend
to change state makes them usable in more situations.

Change-Id: I4fe538ba1158b25f512d3cccd779e12f6c91da6c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25944
Reviewed-by: Chun-Chen TK Hsu <chunchenhsu@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/utility.cc
src/arch/arm/utility.hh