[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 30/40] target/mips: Adjust set_pc() for nanoMIPS
From: |
Stefan Markovic |
Subject: |
[Qemu-devel] [PATCH v3 30/40] target/mips: Adjust set_pc() for nanoMIPS |
Date: |
Thu, 19 Jul 2018 14:55:02 +0200 |
From: James Hogan <address@hidden>
ERET and ERETNC shouldn't clear MIPS_HFLAG_M16 for nanoMIPS since there
is no ISA bit, so fix set_pc() to skip the hflags update.
Signed-off-by: James Hogan <address@hidden>
Signed-off-by: Yongbok Kim <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Signed-off-by: Stefan Markovic <address@hidden>
Reviewed-by: Aleksandar Markovic <address@hidden>
---
target/mips/op_helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
index 5e10286..c55a1e6 100644
--- a/target/mips/op_helper.c
+++ b/target/mips/op_helper.c
@@ -2428,6 +2428,10 @@ static void debug_post_eret(CPUMIPSState *env)
static void set_pc(CPUMIPSState *env, target_ulong error_pc)
{
env->active_tc.PC = error_pc & ~(target_ulong)1;
+ if (env->insn_flags & ISA_NANOMIPS32) {
+ /* Don't clear MIPS_HFLAG_M16 */
+ return;
+ }
if (error_pc & 1) {
env->hflags |= MIPS_HFLAG_M16;
} else {
--
2.7.4
- Re: [Qemu-devel] [PATCH v3 32/40] elf: Add nanoMIPS specific variations in ELF header fields, (continued)
[Qemu-devel] [PATCH v3 02/40] target/mips: Add nanoMIPS base instruction set opcodes, Stefan Markovic, 2018/07/19
[Qemu-devel] [PATCH v3 26/40] target/mips: Implement CP0 Config0.WR bit functionality, Stefan Markovic, 2018/07/19
[Qemu-devel] [PATCH v3 23/40] target/mips: Implement emulation of nanoMIPS LLWP/SCWP pair, Stefan Markovic, 2018/07/19
[Qemu-devel] [PATCH v3 01/40] target/mips: Add preprocessor constants for nanoMIPS, Stefan Markovic, 2018/07/19
[Qemu-devel] [PATCH v3 30/40] target/mips: Adjust set_pc() for nanoMIPS,
Stefan Markovic <=
[Qemu-devel] [PATCH v3 16/40] target/mips: Implement emulation of nanoMIPS ROTX instruction, Stefan Markovic, 2018/07/19
[Qemu-devel] [PATCH v3 13/40] target/mips: Add emulation of misc nanoMIPS instructions (pool32a0), Stefan Markovic, 2018/07/19
[Qemu-devel] [PATCH v3 05/40] target/mips: Add nanoMIPS decoding and extraction utilities, Stefan Markovic, 2018/07/19