2 * Helper functions for guest memory tracing
4 * Copyright (C) 2016 LluĂs Vilanova <vilanova@ac.upc.edu>
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
10 #ifndef TRACE__MEM_INTERNAL_H
11 #define TRACE__MEM_INTERNAL_H
13 static inline uint8_t trace_mem_get_info(TCGMemOp op
, bool store
)
16 bool be
= (op
& MO_BSWAP
) == MO_BE
;
18 /* remove untraced fields */
19 res
&= (1ULL << 4) - 1;
20 /* make endianness absolute */
33 static inline uint8_t trace_mem_build_info(
34 TCGMemOp size
, bool sign_extend
, TCGMemOp endianness
, bool store
)
38 res
|= (sign_extend
<< 2);
39 if (endianness
== MO_BE
) {
46 #endif /* TRACE__MEM_INTERNAL_H */