/* This is called on every exception exit except for z_riscv_fpu_trap(). In that case the exception level of interest is 1 (soon to be 0).  */
void z_riscv_fpu_exit_exc(z_arch_esf_t *esf)
/* This is called on every exception exit except for z_riscv_fpu_trap(). In that case the exception level of interest is 1 (soon to be 0).  */
void z_riscv_fpu_exit_exc(z_arch_esf_t *esf)
{
	if (fpu_access_allowed(1)) {
		esf->mstatus &= ~MSTATUS_FS;
		esf->mstatus |= _current_cpu->arch.fpu_state;
	} else {
		esf->mstatus &= ~MSTATUS_FS;
	}
}