memory: Introduce size_memop

Introduce no-op size_memop to aid preparatory conversion of
interfaces.

Once interfaces are converted, size_memop will be implemented to
return a MemOp from size in bytes.

Backports commit 66b9b24375ac215cdcbdf9e14d665395360abff4 from qemu
This commit is contained in:
Tony Nguyen 2020-01-07 18:19:26 -05:00 committed by Lioncash
parent 998714db1f
commit dd78f65bc6

View file

@ -107,4 +107,14 @@ typedef enum MemOp {
MO_SSIZE = MO_SIZE | MO_SIGN,
} MemOp;
/* Size in bytes to MemOp. */
static inline unsigned size_memop(unsigned size)
{
/*
* FIXME: No-op to aid conversion of memory_region_dispatch_{read|write}
* "unsigned size" operand into a "MemOp op".
*/
return size;
}
#endif