diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2025-06-03 12:02:00 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2025-06-07 16:40:44 +0100 |
commit | 7aabb6dbba30f0c2bcedbd5593e1292d4d791244 (patch) | |
tree | 8fe60d82197d34672e50241d512e62b2aa39582d | |
parent | 002655381f126a9266e0d378ebebbe87cb257a6a (diff) | |
download | qemu-7aabb6dbba30f0c2bcedbd5593e1292d4d791244.zip qemu-7aabb6dbba30f0c2bcedbd5593e1292d4d791244.tar.gz qemu-7aabb6dbba30f0c2bcedbd5593e1292d4d791244.tar.bz2 |
include/exec: fix assert in size_memop
We can handle larger sized memops now, expand the range of the assert.
Fixes: 4b473e0c60 (tcg: Expand MO_SIZE to 3 bits)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250603110204.838117-14-alex.bennee@linaro.org>
-rw-r--r-- | include/exec/memop.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/exec/memop.h b/include/exec/memop.h index 407a47d..cf7da33 100644 --- a/include/exec/memop.h +++ b/include/exec/memop.h @@ -162,8 +162,8 @@ static inline unsigned memop_size(MemOp op) static inline MemOp size_memop(unsigned size) { #ifdef CONFIG_DEBUG_TCG - /* Power of 2 up to 8. */ - assert((size & (size - 1)) == 0 && size >= 1 && size <= 8); + /* Power of 2 up to 1024 */ + assert(is_power_of_2(size) && size >= 1 && size <= (1 << MO_SIZE)); #endif return (MemOp)ctz32(size); } |