mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
accel/tcg: Introduce tlb_read_idx
Instead of playing with offsetof in various places, use MMUAccessType to index an array. This is easily defined instead of the previous dummy padding array in the union. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
9877ea05de
commit
0b3c75ad1a
3 changed files with 59 additions and 78 deletions
|
@ -111,8 +111,11 @@ typedef struct CPUTLBEntry {
|
|||
use the corresponding iotlb value. */
|
||||
uintptr_t addend;
|
||||
};
|
||||
/* padding to get a power of two size */
|
||||
uint8_t dummy[1 << CPU_TLB_ENTRY_BITS];
|
||||
/*
|
||||
* Padding to get a power of two size, as well as index
|
||||
* access to addr_{read,write,code}.
|
||||
*/
|
||||
target_ulong addr_idx[(1 << CPU_TLB_ENTRY_BITS) / TARGET_LONG_SIZE];
|
||||
};
|
||||
} CPUTLBEntry;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue