Lines Matching full:fpu

7  * preemptive FPU access algorithms implemented in arch/riscv/core/fpu.c.
37 * Test for basic FPU access states.
47 /* the FPU should be dirty now */ in ZTEST()
50 /* flush the FPU and disable it */ in ZTEST()
54 /* read the FP reg back which should re-enable the FPU */ in ZTEST()
57 /* the FPU should be enabled now but not dirty */ in ZTEST()
65 * Test for FPU contention between threads.
72 /* threads should start with the FPU disabled */ in new_thread_check()
73 zassert_true(fpu_is_off(), "FPU not off when starting thread %s", name); in new_thread_check()
89 /* the FPU should be enabled now and not dirty */ in new_thread_check()
90 zassert_true(fpu_is_clean(), "FPU not clean after read"); in new_thread_check()
112 * FPU afterwards. in thread1_entry()
121 * scheduled again, thread2 should be the FPU owner at that point in thread1_entry()
122 * meaning the FPU should then be off for us. in thread1_entry()
129 * Test 3: Let thread2 verify that it still owns the FPU. in thread1_entry()
136 * Test 4: Dirty the FPU for ourself. Schedule to thread2 which won't in thread1_entry()
137 * touch the FPU. Make sure we still own the FPU in dirty state when in thread1_entry()
147 * Test 5: Because we currently own a dirty FPU, we are considered in thread1_entry()
157 * Test 6: Avoid dirtying the FPU (we'll just make sure it holds our in thread1_entry()
160 * make it own the FPU right away. However we won't preemptively own in thread1_entry()
172 * active user, it should still own the FPU as it is not contended. in thread1_entry()
195 * Test 3: Make sure we still own the FPU when scheduled back. in thread2_entry()
202 * Test 4: Confirm that thread1 took the FPU from us. in thread2_entry()
209 * Test 5: Take ownership of the FPU by using it. in thread2_entry()
218 * Test 6: We dirtied the FPU last time therefore we are an active in thread2_entry()
229 * Test 7: thread1 didn't claim the FPU and it wasn't preemptively in thread2_entry()
231 * having been an active user lately as the FPU is not contended. in thread2_entry()
265 /* All exxceptions should always have the FPU disabled initially */ in exception_context()
275 /* make sure the FPU is still off */ in exception_context()
278 /* write to an FPU register */ in exception_context()
281 /* the FPU state should be dirty now */ in exception_context()
284 /* IRQs should have been disabled on us to prevent recursive FPU usage */ in exception_context()
292 /* Ensure the FPU is ours and dirty. */ in ZTEST()
299 /* Exceptions with no FPU usage shouldn't affect our state. */ in ZTEST()
307 * Exceptions with FPU usage should be trapped to save our context in ZTEST()
308 * before letting its accesses go through. Because our FPU state in ZTEST()
310 * active user and the FPU context should be preemptively restored in ZTEST()
320 * Do the exception with FPU usage again, but this time our current in ZTEST()
321 * FPU state is clean, meaning we're no longer an active user. in ZTEST()
322 * This means our FPU context should not be preemptively restored. in ZTEST()
328 /* Make sure we still have proper context when accessing the FPU. */ in ZTEST()
335 * Test for proper FPU instruction trap.
337 * There is no dedicated FPU trap flag bit on RISC-V. FPU specific opcodes
343 /* disable the FPU access */ \
355 /* confirm that the FPU state has changed */ \