[Qemu-devel] [PATCH v5 49/76] target/mips: Adjust exception_resume_pc() for nanoMIPS

Aleksandar Markovic posted 76 patches 7 years, 3 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v5 49/76] target/mips: Adjust exception_resume_pc() for nanoMIPS
Posted by Aleksandar Markovic 7 years, 3 months ago
From: James Hogan <james.hogan@mips.com>

We shouldn't set the ISA bit in CP0_EPC for nanoMIPS.

Signed-off-by: James Hogan <james.hogan@mips.com>
Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Stefan Markovic <smarkovic@wavecomp.com>
---
 target/mips/helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/mips/helper.c b/target/mips/helper.c
index a576fa4..371fecf 100644
--- a/target/mips/helper.c
+++ b/target/mips/helper.c
@@ -656,7 +656,8 @@ target_ulong exception_resume_pc (CPUMIPSState *env)
     target_ulong bad_pc;
     target_ulong isa_mode;
 
-    isa_mode = !!(env->hflags & MIPS_HFLAG_M16);
+    isa_mode = env->hflags & MIPS_HFLAG_M16 &&
+                !(env->insn_flags & ISA_NANOMIPS32);
     bad_pc = env->active_tc.PC | isa_mode;
     if (env->hflags & MIPS_HFLAG_BMASK) {
         /* If the exception was raised from a delay slot, come back to
-- 
2.7.4


Re: [Qemu-devel] [PATCH v5 49/76] target/mips: Adjust exception_resume_pc() for nanoMIPS
Posted by Richard Henderson 7 years, 3 months ago
On 07/30/2018 12:12 PM, Aleksandar Markovic wrote:
> -    isa_mode = !!(env->hflags & MIPS_HFLAG_M16);
> +    isa_mode = env->hflags & MIPS_HFLAG_M16 &&
> +                !(env->insn_flags & ISA_NANOMIPS32);

Likewise re nanomips not setting M16.


r~

Re: [Qemu-devel] [PATCH v5 49/76] target/mips: Adjust exception_resume_pc() for nanoMIPS
Posted by Aleksandar Markovic 7 years, 3 months ago
Hi, Richard.

> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Tuesday, July 31, 2018 9:18 PM
> On 07/30/2018 12:12 PM, Aleksandar Markovic wrote:
> > -    isa_mode = !!(env->hflags & MIPS_HFLAG_M16);
> > +    isa_mode = env->hflags & MIPS_HFLAG_M16 &&
> > +                !(env->insn_flags & ISA_NANOMIPS32);
> 
> Likewise re nanomips not setting M16.

For this group of patches related to M16 we devised a solution, however, som of the test are failing, and wee need more time to analyze the failures and the solution. This means that any fix won't be included in v6, or any later version, until we find and verify a good solution. This is just to give you heads up, so that you don't spend time on reviewing patches that did not change from the preceding version. Of course, many thanks for all reviews so far.

Yours,
Aleksandar