mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
include/exec/memopidx: Adjust for 32 mmu indexes
Reviewed-by: Pierrick Bouvier <[email protected]> Signed-off-by: Richard Henderson <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]>
This commit is contained in:
1 parent
4983e3ccc9
commit
d182123974
1 file changed
+5
-4
@@ -25,9 +25,10 @@ typedef uint32_t MemOpIdx;
|
||||
static inline MemOpIdx make_memop_idx(MemOp op, unsigned idx)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_TCG
|
||||
assert(idx <= 15);
|
||||
assert(idx <= 31);
|
||||
assert(clz32(op) >= 5);
|
||||
#endif
|
||||
return (op << 4) | idx;
|
||||
return (op << 5) | idx;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,7 +39,7 @@ static inline MemOpIdx make_memop_idx(MemOp op, unsigned idx)
|
||||
*/
|
||||
static inline MemOp get_memop(MemOpIdx oi)
|
||||
{
|
||||
return oi >> 4;
|
||||
return oi >> 5;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,7 +50,7 @@ static inline MemOp get_memop(MemOpIdx oi)
|
||||
*/
|
||||
static inline unsigned get_mmuidx(MemOpIdx oi)
|
||||
{
|
||||
return oi & 15;
|
||||
return oi & 31;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user