Skip to content

Commit

Permalink
target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR
Browse files Browse the repository at this point in the history
In commit e9d6528 we extracted the vfp_set_fpscr_to_host()
function but failed at calling it in the correct place, we call
it after xregs[ARM_VFP_FPSCR] is modified.

Fix by calling this function before we update FPSCR.

Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Message-id: 20190705124318.1075-1-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
philmd authored and pm215 committed Jul 8, 2019
1 parent c8ead57 commit 8579518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target/arm/vfp_helper.c
Expand Up @@ -197,6 +197,8 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
val &= 0xf7c0009f;
}

vfp_set_fpscr_to_host(env, val);

/*
* We don't implement trapped exception handling, so the
* trap enable bits, IDE|IXE|UFE|OFE|DZE|IOE are all RAZ/WI (not RES0!)
Expand All @@ -217,8 +219,6 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
env->vfp.qc[1] = 0;
env->vfp.qc[2] = 0;
env->vfp.qc[3] = 0;

vfp_set_fpscr_to_host(env, val);
}

void vfp_set_fpscr(CPUARMState *env, uint32_t val)
Expand Down

0 comments on commit 8579518

Please sign in to comment.