/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com)3*4*/56#ifndef _ASM_ARC_FPU_H7#define _ASM_ARC_FPU_H89#ifdef CONFIG_ARC_FPU_SAVE_RESTORE1011#include <asm/ptrace.h>1213#ifdef CONFIG_ISA_ARCOMPACT1415/* These DPFP regs need to be saved/restored across ctx-sw */16struct arc_fpu {17struct {18unsigned int l, h;19} aux_dpfp[2];20};2122#define fpu_init_task(regs)2324#else2526/*27* ARCv2 FPU Control aux register28* - bits to enable Traps on Exceptions29* - Rounding mode30*31* ARCv2 FPU Status aux register32* - FPU exceptions flags (Inv, Div-by-Zero, overflow, underflow, inexact)33* - Flag Write Enable to clear flags explicitly (vs. by fpu instructions34* only35*/3637struct arc_fpu {38unsigned int ctrl, status;39};4041extern void fpu_init_task(struct pt_regs *regs);4243#endif /* !CONFIG_ISA_ARCOMPACT */4445struct task_struct;4647extern void fpu_save_restore(struct task_struct *p, struct task_struct *n);4849#else /* !CONFIG_ARC_FPU_SAVE_RESTORE */5051#define fpu_save_restore(p, n)52#define fpu_init_task(regs)5354#endif /* CONFIG_ARC_FPU_SAVE_RESTORE */5556#endif /* _ASM_ARC_FPU_H */575859