mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 01:58:28 +00:00
cpu_ldst.h: Allow NB_MMU_MODES to be 7
Support guest CPUs which need 7 MMU index values. Add a comment about what would be required to raise the limit further (trivial for 8, TCG backend rework for 9 or more). Backports commit 8f3ae2ae2d02727f6d56610c09d7535e43650dd4 from qemu
This commit is contained in:
parent
ec4dae08e4
commit
9d02c52b8a
1 changed files with 25 additions and 3 deletions
|
@ -290,9 +290,31 @@ uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
|
|||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 6) */
|
||||
|
||||
#if (NB_MMU_MODES > 6)
|
||||
#error "NB_MMU_MODES > 6 is not supported for now"
|
||||
#endif /* (NB_MMU_MODES > 6) */
|
||||
#if (NB_MMU_MODES >= 7) && defined(MMU_MODE6_SUFFIX)
|
||||
|
||||
#define CPU_MMU_INDEX 6
|
||||
#define MEMSUFFIX MMU_MODE6_SUFFIX
|
||||
#define DATA_SIZE 1
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 2
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 4
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 8
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
#undef CPU_MMU_INDEX
|
||||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 7) */
|
||||
|
||||
#if (NB_MMU_MODES > 7)
|
||||
/* Note that supporting NB_MMU_MODES == 9 would require
|
||||
* changes to at least the ARM TCG backend.
|
||||
*/
|
||||
#error "NB_MMU_MODES > 7 is not supported for now"
|
||||
#endif /* (NB_MMU_MODES > 7) */
|
||||
|
||||
/* these access are slower, they must be as rare as possible */
|
||||
#define CPU_MMU_INDEX (cpu_mmu_index(env))
|
||||
|
|
Loading…
Reference in a new issue