Lines Matching refs:mstatus
65 unsigned long status = csr_read(mstatus); in z_riscv_fpu_disable()
70 csr_clear(mstatus, MSTATUS_FS); in z_riscv_fpu_disable()
79 __ASSERT((csr_read(mstatus) & MSTATUS_IEN) == 0, in z_riscv_fpu_load()
81 __ASSERT((csr_read(mstatus) & MSTATUS_FS) == 0, in z_riscv_fpu_load()
88 csr_set(mstatus, MSTATUS_FS_INIT); in z_riscv_fpu_load()
103 __ASSERT((csr_read(mstatus) & MSTATUS_IEN) == 0, in arch_flush_local_fpu()
105 __ASSERT((csr_read(mstatus) & MSTATUS_FS) == 0, in arch_flush_local_fpu()
115 csr_set(mstatus, MSTATUS_FS_CLEAN); in arch_flush_local_fpu()
124 csr_clear(mstatus, MSTATUS_FS); in arch_flush_local_fpu()
135 __ASSERT((csr_read(mstatus) & MSTATUS_IEN) == 0, in flush_owned_fpu()
209 __ASSERT((esf->mstatus & MSTATUS_FS) == 0 && in z_riscv_fpu_trap()
210 (csr_read(mstatus) & MSTATUS_FS) == 0, in z_riscv_fpu_trap()
223 esf->mstatus &= ~MSTATUS_MPIE_EN; in z_riscv_fpu_trap()
226 esf->mstatus |= MSTATUS_FS_INIT; in z_riscv_fpu_trap()
240 esf->mstatus |= MSTATUS_FS_CLEAN; in z_riscv_fpu_trap()
256 __ASSERT((csr_read(mstatus) & MSTATUS_IEN) == 0, in fpu_access_allowed()
299 esf->mstatus &= ~MSTATUS_FS; in z_riscv_fpu_exit_exc()
300 esf->mstatus |= _current_cpu->arch.fpu_state; in z_riscv_fpu_exit_exc()
302 esf->mstatus &= ~MSTATUS_FS; in z_riscv_fpu_exit_exc()
315 csr_clear(mstatus, MSTATUS_FS); in z_riscv_fpu_thread_context_switch()
316 csr_set(mstatus, _current_cpu->arch.fpu_state); in z_riscv_fpu_thread_context_switch()