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 <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -491,13 +491,10 @@ X86ISA::I8042::write(PacketPtr pkt)
|
||||
void
|
||||
X86ISA::I8042::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
uint8_t statusRegData = statusReg.__data;
|
||||
uint8_t commandByteData = commandByte.__data;
|
||||
|
||||
SERIALIZE_SCALAR(dataPort);
|
||||
SERIALIZE_SCALAR(commandPort);
|
||||
SERIALIZE_SCALAR(statusRegData);
|
||||
SERIALIZE_SCALAR(commandByteData);
|
||||
SERIALIZE_SCALAR(statusReg);
|
||||
SERIALIZE_SCALAR(commandByte);
|
||||
SERIALIZE_SCALAR(dataReg);
|
||||
SERIALIZE_SCALAR(lastCommand);
|
||||
mouse.serialize("mouse", cp);
|
||||
@@ -507,20 +504,14 @@ X86ISA::I8042::serialize(CheckpointOut &cp) const
|
||||
void
|
||||
X86ISA::I8042::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
uint8_t statusRegData;
|
||||
uint8_t commandByteData;
|
||||
|
||||
UNSERIALIZE_SCALAR(dataPort);
|
||||
UNSERIALIZE_SCALAR(commandPort);
|
||||
UNSERIALIZE_SCALAR(statusRegData);
|
||||
UNSERIALIZE_SCALAR(commandByteData);
|
||||
UNSERIALIZE_SCALAR(statusReg);
|
||||
UNSERIALIZE_SCALAR(commandByte);
|
||||
UNSERIALIZE_SCALAR(dataReg);
|
||||
UNSERIALIZE_SCALAR(lastCommand);
|
||||
mouse.unserialize("mouse", cp);
|
||||
keyboard.unserialize("keyboard", cp);
|
||||
|
||||
statusReg.__data = statusRegData;
|
||||
commandByte.__data = commandByteData;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -77,16 +77,13 @@ X86ISA::Speaker::write(PacketPtr pkt)
|
||||
void
|
||||
X86ISA::Speaker::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
uint8_t controlValData = controlVal.__data;
|
||||
SERIALIZE_SCALAR(controlValData);
|
||||
SERIALIZE_SCALAR(controlVal);
|
||||
}
|
||||
|
||||
void
|
||||
X86ISA::Speaker::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
uint8_t controlValData;
|
||||
UNSERIALIZE_SCALAR(controlValData);
|
||||
controlVal.__data = controlValData;
|
||||
UNSERIALIZE_SCALAR(controlVal);
|
||||
}
|
||||
|
||||
X86ISA::Speaker *
|
||||
|
||||
Reference in New Issue
Block a user