1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com)
10 #ifdef CONFIG_ARC_FPU_SAVE_RESTORE
12 #include <asm/ptrace.h>
14 #ifdef CONFIG_ISA_ARCOMPACT
16 /* These DPFP regs need to be saved/restored across ctx-sw */
23 #define fpu_init_task(regs)
28 * ARCv2 FPU Control aux register
29 * - bits to enable Traps on Exceptions
32 * ARCv2 FPU Status aux register
33 * - FPU exceptions flags (Inv, Div-by-Zero, overflow, underflow, inexact)
34 * - Flag Write Enable to clear flags explicitly (vs. by fpu instructions
39 unsigned int ctrl
, status
;
42 extern void fpu_init_task(struct pt_regs
*regs
);
44 #endif /* !CONFIG_ISA_ARCOMPACT */
46 extern void fpu_save_restore(struct task_struct
*p
, struct task_struct
*n
);
48 #else /* !CONFIG_ARC_FPU_SAVE_RESTORE */
50 #define fpu_save_restore(p, n)
51 #define fpu_init_task(regs)
53 #endif /* CONFIG_ARC_FPU_SAVE_RESTORE */
55 #endif /* _ASM_ARC_FPU_H */