On 07/30/2018 12:12 PM, Aleksandar Markovic wrote:
> From: James Hogan <james.ho...@mips.com>
> 
> 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 <james.ho...@mips.com>
> Signed-off-by: Yongbok Kim <yongbok....@mips.com>
> Signed-off-by: Aleksandar Markovic <amarko...@wavecomp.com>
> Signed-off-by: Stefan Markovic <smarko...@wavecomp.com>
> Reviewed-by: Aleksandar Markovic <amarko...@wavecomp.com>
> ---
>  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;

You don't want this for nanomips either, surely.

> +    if (env->insn_flags & ISA_NANOMIPS32) {
> +        /* Don't clear MIPS_HFLAG_M16 */
> +        return;
> +    }

Likewise re nanomips not setting M16.


r~

Reply via email to