target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR

In commit e9d652824b0 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.

Backports commit 85795187f416326f87177cabc39fae1911f04c50 from qemu
This commit is contained in:
Philippe Mathieu-Daudé 2019-08-08 19:21:20 -04:00 committed by Lioncash
parent c687259bf6
commit 6f8c8046d8
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -200,6 +200,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!)
@ -220,8 +222,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)