diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-08-07 09:59:28 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-08-07 09:59:28 +0100 |
commit | bbb3abc16711e14858094b64a2eb1eb53204dded (patch) | |
tree | b01975e299b0eedf7561ee925aee9830b949a54f /src/sim | |
parent | ce8939a97e26eb96cfe0604e737c0b155ba07656 (diff) | |
download | gem5-bbb3abc16711e14858094b64a2eb1eb53204dded.tar.xz |
mem: Cleanup packet accessor methods
The Packet::get() and Packet::set() methods both have very strange
semantics. Currently, they automatically convert between the guest
system's endianness and the host system's endianness. This behavior is
usually undesired and unexpected.
This patch introduces three new method pairs to access data:
* getLE() / setLE() - Get data stored as little endian.
* getBE() / setBE() - Get data stored as big endian.
* get(ByteOrder) / set(v, ByteOrder) - Configurable endianness
For example, a little endian device that is receiving a write request
will use teh getLE() method to get the data from the packet.
The old interface will be deprecated once all existing devices have
been ported to the new interface.
Diffstat (limited to 'src/sim')
0 files changed, 0 insertions, 0 deletions