qemu-e2k/target/mips
James Hogan b0fc600322 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.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Yongbok Kim <yongbok.kim@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
2017-07-20 22:42:26 +01:00
..
Makefile.objs
TODO
cpu-qom.h
cpu.c qom/cpu: move tlb_flush to cpu_common_reset 2017-01-13 14:24:31 +00:00
cpu.h target/mips: Abstract mmu_idx from hflags 2017-07-20 22:42:26 +01:00
dsp_helper.c
gdbstub.c
helper.c target/mips: Check memory permissions with mem_idx 2017-07-20 22:42:26 +01:00
helper.h target-mips: Use clz opcode 2017-01-10 08:06:11 -08:00
kvm.c vcpu_dirty: share the same field in CPUState for all accelerators 2017-07-04 14:30:03 +02:00
kvm_mips.h
lmi_helper.c
machine.c target/mips: Add CP0_Ebase.WG (write gate) support 2017-07-20 22:42:26 +01:00
mips-defs.h
mips-semi.c
msa_helper.c
op_helper.c target/mips: Abstract mmu_idx from hflags 2017-07-20 22:42:26 +01:00
trace-events target-mips: replace few LOG_DISAS() with trace points 2017-03-20 11:06:32 +00:00
translate.c target/mips: Abstract mmu_idx from hflags 2017-07-20 22:42:26 +01:00
translate_init.c target/mips: Add CP0_Ebase.WG (write gate) support 2017-07-20 22:42:26 +01:00