summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorTony Nguyen2019-08-23 20:36:53 +0200
committerRichard Henderson2019-09-03 17:30:39 +0200
commitbe5c4787e9a6eed12fd765d9e890f7cc6cd63220 (patch)
tree0cbc14c4da285fb3e7f62048f50b69f7d67aa069 /include/exec
parentmemory: Access MemoryRegion with endianness (diff)
downloadqemu-be5c4787e9a6eed12fd765d9e890f7cc6cd63220.tar.gz
qemu-be5c4787e9a6eed12fd765d9e890f7cc6cd63220.tar.xz
qemu-be5c4787e9a6eed12fd765d9e890f7cc6cd63220.zip
cputlb: Replace size and endian operands for MemOp
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Signed-off-by: Tony Nguyen <tony.nguyen@bt.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <755b7104410956b743e1f1e9c34ab87db113360f.1566466906.git.tony.nguyen@bt.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memop.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/exec/memop.h b/include/exec/memop.h
index 0a610b75d9..529d07b02d 100644
--- a/include/exec/memop.h
+++ b/include/exec/memop.h
@@ -125,4 +125,10 @@ static inline MemOp size_memop(unsigned size)
return ctz32(size);
}
+/* Big endianness from MemOp. */
+static inline bool memop_big_endian(MemOp op)
+{
+ return (op & MO_BSWAP) == MO_BE;
+}
+
#endif