unicorn/qemu/target/mips
James Hogan f285157856
target/mips: Abstract mmu_idx from hflags
The MIPS mmu_idx is sometimes calculated from hflags without an env
pointer available as cpu_mmu_index() requires.

Create a common hflags_mmu_index() for the purpose of this calculation
which can operate on any hflags, not just with an env pointer, and
update cpu_mmu_index() itself and gen_intermediate_code() to use it.

Also update debug_post_eret() and helper_mtc0_status() to log the MMU
mode with the status change (SM, UM, or nothing for kernel mode) based
on cpu_mmu_index() rather than directly testing hflags.

This will also allow the logic to be more easily updated when a new MMU
mode is added.

Backports commit b0fc6003224543d2bdb172eca752656a6223e4a1 from qemu
2018-03-04 00:45:00 -05:00
..
cpu-qom.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cpu.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cpu.h target/mips: Abstract mmu_idx from hflags 2018-03-04 00:45:00 -05:00
dsp_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
helper.c target/mips: Check memory permissions with mem_idx 2018-03-04 00:40:22 -05:00
helper.h target-mips: make ITC Configuration Tags accessible to the CPU 2018-03-04 00:34:30 -05:00
lmi_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
Makefile.objs Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
mips-defs.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
msa_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
op_helper.c target/mips: Abstract mmu_idx from hflags 2018-03-04 00:45:00 -05:00
TODO Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
translate.c target/mips: Abstract mmu_idx from hflags 2018-03-04 00:45:00 -05:00
translate_init.c target-mips: enable CM GCR in MIPS64R6-generic CPU 2018-03-04 00:24:09 -05:00
unicorn.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
unicorn.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00