From cd9450c1d95d9494e2714ec84620c548b0eebbb1 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 6 Jan 2018 05:30:46 -0800 Subject: base: Rework bitunions so they can be more flexible. They are now oriented around a class which makes it easy to provide custom setter/getter functions which let you set or read bits in an arbitrary way. Future additions may add the ability to add custom bitfield methods, and index-able bitfields. Change-Id: Ibd6d4d9e49107490f6dad30a4379a8c93bda9333 Reviewed-on: https://gem5-review.googlesource.com/7201 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black --- src/sim/serialize.hh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/sim') diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh index 1005d5b97..b6c026394 100644 --- a/src/sim/serialize.hh +++ b/src/sim/serialize.hh @@ -72,33 +72,33 @@ typedef std::ostream CheckpointOut; template void paramOut(CheckpointOut &cp, const std::string &name, const T ¶m); -template +template void paramOut(CheckpointOut &cp, const std::string &name, - const BitfieldBackend::BitUnionOperators &p) + const BitfieldBackend::BitUnionOperators &p) { - paramOut(cp, name, p.__data); + paramOut(cp, name, p.__storage); } template void paramIn(CheckpointIn &cp, const std::string &name, T ¶m); -template +template void paramIn(CheckpointIn &cp, const std::string &name, - BitfieldBackend::BitUnionOperators &p) + BitfieldBackend::BitUnionOperators &p) { - paramIn(cp, name, p.__data); + paramIn(cp, name, p.__storage); } template bool optParamIn(CheckpointIn &cp, const std::string &name, T ¶m, bool warn = true); -template +template bool optParamIn(CheckpointIn &cp, const std::string &name, - BitfieldBackend::BitUnionOperators &p, + BitfieldBackend::BitUnionOperators &p, bool warn = true) { - return optParamIn(cp, name, p.__data, warn); + return optParamIn(cp, name, p.__storage, warn); } template -- cgit v1.2.3