At this point the mechanism should closely resemble the powerpc64
save/restore points with one difference. (reload avoidance)
The previous 'aggressive' fpu save code that was (mostly) implemented before
and is present on arm32 and arm64.
There is one piece from that other design that remains, if
pcb->pcb_fpcpu == ci && ci->ci_fpuproc == p
after sleep, this will automatically re-activate the FPU state without
needing to reload it.
To enable this, the pointer pair is not changed on FPU context save
to indicate that the CPU still holds the valid content as long as both
of those pointers are pointing to each other.
Note that if another core steals the FPU conxtex (when we get to SMP)
the pcb->pcb_fpcpu will be another cpu, and from that it will know
to reload the FPU context. Also optimistically enabling this only makes
sense on riscv64 because there is the notion of FPU on and clean. Other
implimentations would need to 'fault on' the FPU enable, but could avoid
the FPU context load if no other processor has run this FPU context and no
other process has use FPU on this core.
ok kettenis@ deraadt@ Prior to a couple of fixes.
(this file was missing from original commit)
-/* $OpenBSD: signal.h,v 1.3 2021/05/13 08:44:18 jsg Exp $ */
+/* $OpenBSD: signal.h,v 1.4 2021/05/20 15:14:30 drahn Exp $ */
/*-
* Copyright (c) 1986, 1989, 1991, 1993
__register_t sc_a[8];
__register_t sc_sepc;
+ /* 64 bit floats as well as integer registers */
+ __register_t sc_f[32]; /* floating-point registers */
+ __register_t sc_fcsr; /* floating-point control register */
+
long sc_cookie;
};