simd_powerpc.h: enable FPU on FreeBSD

FreeBSD nowadays supports FPU in the kernel on powerpc*, so enable it.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Piotr Kubaj <pkubaj@FreeBSD.org>
Closes #17191
This commit is contained in:
Piotr Kubaj 2025-04-01 13:18:38 +00:00 committed by GitHub
parent 75e921da6f
commit 11ca12dbd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,11 +49,18 @@
#include <machine/pcb.h>
#include <machine/cpu.h>
#include <machine/fpu.h>
#define kfpu_allowed() 0
#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
#define kfpu_begin() do {} while (0)
#define kfpu_end() do {} while (0)
#define kfpu_begin() { \
if (__predict_false(!is_fpu_kern_thread(0))) \
fpu_kern_enter(PCPU_GET(curthread), NULL, FPU_KERN_NOCTX);\
}
#define kfpu_end() { \
if (__predict_false(PCPU_GET(curpcb)->pcb_flags & PCB_KERN_FPU_NOSAVE))\
fpu_kern_leave(PCPU_GET(curthread), NULL); \
}
#define kfpu_init() (0)
#define kfpu_fini() do {} while (0)