[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v11 04/46] target/mips: Prevent switching mode relat
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PATCH v11 04/46] target/mips: Prevent switching mode related to Config3 ISA bit for nanoMIPS |
Date: |
Mon, 20 Aug 2018 20:16:12 +0200 |
From: Stefan Markovic <address@hidden>
Only if Config3.ISA is 3 (microMIPS), the mode should be switched in
cpu_state_reset(). Config3.ISA is 1 for nanoMIPS processors, and no mode
change should happen.
Signed-off-by: Aleksandar Markovic <address@hidden>
---
target/mips/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 4f95b9a..7fb322b 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -21841,8 +21841,8 @@ void cpu_state_reset(CPUMIPSState *env)
env->CP0_Status |= (1 << CP0St_FR);
}
- if (env->CP0_Config3 & (1 << CP0C3_ISA)) {
- /* microMIPS on reset when Config3.ISA == {1, 3} */
+ if (env->CP0_Config3 & (1 << CP0C3_ISA) & (1 << (CP0C3_ISA + 1))) {
+ /* microMIPS on reset when Config3.ISA is 3 */
env->hflags |= MIPS_HFLAG_M16;
}
--
2.7.4
- [Qemu-devel] [PATCH v11 40/46] elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too, (continued)
- [Qemu-devel] [PATCH v11 40/46] elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 14/46] target/mips: Add emulation of some common nanoMIPS 32-bit instructions, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 34/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 6, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 12/46] target/mips: Add emulation of nanoMIPS 16-bit logic instructions, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 19/46] target/mips: Add emulation of misc nanoMIPS instructions (pool32axf), Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 24/46] target/mips: Add CP0 Config3 and Config5 fields to DisasContext structure, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 23/46] target/mips: Add emulation of nanoMIPS 32-bit load and store instructions, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 21/46] target/mips: Implement emulation of nanoMIPS ROTX instruction, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 07/46] target/mips: Add emulation of nanoMIPS 16-bit arithmetic instructions, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 04/46] target/mips: Prevent switching mode related to Config3 ISA bit for nanoMIPS,
Aleksandar Markovic <=
- [Qemu-devel] [PATCH v11 10/46] target/mips: Add emulation of nanoMIPS 16-bit misc instructions, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 05/46] target/mips: Add placeholder and invocation of decode_nanomips_opc(), Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 17/46] target/mips: Add emulation of nanoMIPS FP instructions, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 27/46] target/mips: Fix pre-nanoMIPS MT ASE instructions availability control, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 30/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 15/46] target/mips: Add emulation of nanoMIPS instructions MOVE.P and MOVE.PREV, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 08/46] target/mips: Add emulation of nanoMIPS 16-bit branch instructions, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 06/46] target/mips: Add nanoMIPS decoding and extraction utilities, Aleksandar Markovic, 2018/08/20
- [Qemu-devel] [PATCH v11 01/46] target/mips: Add preprocessor constants for nanoMIPS, Aleksandar Markovic, 2018/08/20