sim: Add gtoh/htog helpers that take an explicit endianness
authorChuan Zhu <chuan.zhu@arm.com>
Wed, 2 Aug 2017 08:52:28 +0000 (09:52 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Fri, 16 Feb 2018 09:25:14 +0000 (09:25 +0000)
commitd5231d14af1fbc52c9325b51cacb86bf2fd91686
treec77656b38ac245cc7a9875c2e34d7a17ab2d958e
parentcf58af7cf2402a280d6789797a9bc956209bdc30
sim: Add gtoh/htog helpers that take an explicit endianness

Add helper functions to swap between guest byte order and host byte
order that take a guest endianness as a parameter. These functions are
called htog and htog to be consistent with the helper functions that
extract guest byte order from a compile time constant.

Change-Id: Ie6be7dfd3b7a58ad6bfb57b25be5f85b5f425929
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/8201
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
src/sim/byteswap.hh