To convert interfaces of MemoryRegion access, MEMOP_SIZE and SIZE_MEMOP no-op stubs were introduced to change syntax while keeping the existing semantics. Now with interfaces converted, we fill the stubs and use MemOp semantics. Signed-off-by: Tony Nguyen --- include/exec/memop.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/exec/memop.h b/include/exec/memop.h index 09c8d20..f2847e8 100644 --- a/include/exec/memop.h +++ b/include/exec/memop.h @@ -106,8 +106,7 @@ typedef enum MemOp { MO_SSIZE = MO_SIZE | MO_SIGN, } MemOp; -/* No-op while memory_region_dispatch_[read|write] is converted to MemOp */ -#define MEMOP_SIZE(op) (op) /* MemOp to size. */ -#define SIZE_MEMOP(ul) (ul) /* Size to MemOp. */ +#define MEMOP_SIZE(op) (1 << ((op) & MO_SIZE)) /* MemOp to size. */ +#define SIZE_MEMOP(ul) (ctzl(ul)) /* Size to MemOp. */ #endif -- 1.8.3.1