2 * Combine the MemOp and mmu_idx parameters into a single value.
5 * Richard Henderson <rth@twiddle.net>
7 * This work is licensed under the terms of the GNU GPL, version 2 or later.
8 * See the COPYING file in the top-level directory.
11 #ifndef EXEC_MEMOPIDX_H
12 #define EXEC_MEMOPIDX_H
14 #include "exec/memop.h"
16 typedef uint32_t MemOpIdx
;
20 * @op: memory operation
23 * Encode these values into a single parameter.
25 static inline MemOpIdx
make_memop_idx(MemOp op
, unsigned idx
)
27 #ifdef CONFIG_DEBUG_TCG
30 return (op
<< 4) | idx
;
35 * @oi: combined op/idx parameter
37 * Extract the memory operation from the combined value.
39 static inline MemOp
get_memop(MemOpIdx oi
)
46 * @oi: combined op/idx parameter
48 * Extract the mmu index from the combined value.
50 static inline unsigned get_mmuidx(MemOpIdx oi
)