[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 25/40] target/mips: Add updating CP0 BadInstrX re
From: |
Stefan Markovic |
Subject: |
[Qemu-devel] [PATCH v3 25/40] target/mips: Add updating CP0 BadInstrX register for nanoMIPs only |
Date: |
Thu, 19 Jul 2018 14:54:57 +0200 |
From: Stefan Markovic <address@hidden>
Signed-off-by: Yongbok Kim <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Signed-off-by: Stefan Markovic <address@hidden>
---
target/mips/helper.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/mips/helper.c b/target/mips/helper.c
index 5299f21..9535131 100644
--- a/target/mips/helper.c
+++ b/target/mips/helper.c
@@ -695,6 +695,12 @@ static inline void set_badinstr_registers(CPUMIPSState
*env)
instr |= cpu_lduw_code(env, env->active_tc.PC + 2);
}
env->CP0_BadInstr = instr;
+
+ if ((env->insn_flags & ISA_NANOMIPS32) &&
+ ((instr & 0xFC000000) == 0x60000000)) {
+ instr = cpu_lduw_code(env, env->active_tc.PC + 4) << 16;
+ env->CP0_BadInstrX = instr;
+ }
}
if ((env->CP0_Config3 & (1 << CP0C3_BP)) &&
(env->hflags & MIPS_HFLAG_BMASK)) {
--
2.7.4
- Re: [Qemu-devel] [PATCH v3 03/40] target/mips: Add nanoMIPS DSP ASE opcodes, (continued)
- [Qemu-devel] [PATCH v3 06/40] target/mips: Add emulation of misc nanoMIPS 16-bit instructions, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 14/40] target/mips: Add emulation of misc nanoMIPS instructions (pool32axf), Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 38/40] gdbstub: Disable handling of nanoMIPS ISA bit in the MIPS gdbstub, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 34/40] linux-user: Don't check FCR31_NAN2008 bit for nanoMIPS, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 25/40] target/mips: Add updating CP0 BadInstrX register for nanoMIPs only,
Stefan Markovic <=
- [Qemu-devel] [PATCH v3 35/40] mips_malta: Add basic nanoMIPS boot code for MIPS' Malta, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 27/40] target/mips: Adjust behavior of Config3's ISAOnExc bit for nanoMIPS, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 37/40] mips_malta: Fix semihosting argument passing for nanoMIPS bare metal, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 32/40] elf: Add nanoMIPS specific variations in ELF header fields, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 02/40] target/mips: Add nanoMIPS base instruction set opcodes, Stefan Markovic, 2018/07/19