[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 27/35] target/mips: Fix nanoMIPS set_hflags_for_hand
From: |
Yongbok Kim |
Subject: |
[Qemu-devel] [PATCH 27/35] target/mips: Fix nanoMIPS set_hflags_for_handler |
Date: |
Wed, 20 Jun 2018 13:06:12 +0100 |
From: James Hogan <address@hidden>
We shouldn't clear M16 mode when entering an interrupt on nanoMIPS,
otherwise we'll start interpreting the code as normal MIPS code.
Signed-off-by: James Hogan <address@hidden>
Signed-off-by: Yongbok Kim <address@hidden>
---
target/mips/helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/mips/helper.c b/target/mips/helper.c
index 20a81aa..efc3f25 100644
--- a/target/mips/helper.c
+++ b/target/mips/helper.c
@@ -671,6 +671,9 @@ target_ulong exception_resume_pc (CPUMIPSState *env)
#if !defined(CONFIG_USER_ONLY)
static void set_hflags_for_handler (CPUMIPSState *env)
{
+ if (env->insn_flags & ISA_NANOMIPS32) {
+ return;
+ }
/* Exception handlers are entered in 32-bit mode. */
env->hflags &= ~(MIPS_HFLAG_M16);
/* ...except that microMIPS lets you choose. */
--
1.9.1
- [Qemu-devel] [PATCH 20/35] target/mips: Fix not to update BadVAddr in Debug Mode, (continued)
- [Qemu-devel] [PATCH 20/35] target/mips: Fix not to update BadVAddr in Debug Mode, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 21/35] target/mips: Add nanoMIPS rotx instruction, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 22/35] target/mips: Fix data type for offset, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 23/35] target/mips: Update BadInstr{P} regs on nanoMIPS, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 24/35] target/mips: Add nanoMIPS CP0_BadInstrX register, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 25/35] target/mips: Config3.ISAOnExc is read only in nanoMIPS, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 26/35] target/mips: Fix nanoMIPS exception_resume_pc, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 27/35] target/mips: Fix nanoMIPS set_hflags_for_handler,
Yongbok Kim <=
- [Qemu-devel] [PATCH 28/35] target/mips: Fix nanoMIPS set_pc, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 29/35] target/mips: Fix ERET/ERETNC can cause ADEL exception, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 30/35] hw/mips: Add basic nanoMIPS boot code, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 31/35] mips_malta: Setup GT64120 BARs in nanoMIPS bootloader, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 32/35] hw/mips: Fix semihosting argument passing for nanoMIPS bare metal, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 33/35] target/mips: Fix gdbstub to read/write 64 bit FP registers, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 34/35] target/mips: Disable gdbstub nanoMIPS ISA bit, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 35/35] target/mips: Add I7200 CPU, Yongbok Kim, 2018/06/20