Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *  arch/arm/include/asm/fpstate.h
0004  *
0005  *  Copyright (C) 1995 Russell King
0006  */
0007 
0008 #ifndef __ASM_ARM_FPSTATE_H
0009 #define __ASM_ARM_FPSTATE_H
0010 
0011 
0012 #ifndef __ASSEMBLY__
0013 
0014 /*
0015  * VFP storage area has:
0016  *  - FPEXC, FPSCR, FPINST and FPINST2.
0017  *  - 16 or 32 double precision data registers
0018  *  - an implementation-dependent word of state for FLDMX/FSTMX (pre-ARMv6)
0019  * 
0020  *  FPEXC will always be non-zero once the VFP has been used in this process.
0021  */
0022 
0023 struct vfp_hard_struct {
0024 #ifdef CONFIG_VFPv3
0025     __u64 fpregs[32];
0026 #else
0027     __u64 fpregs[16];
0028 #endif
0029 #if __LINUX_ARM_ARCH__ < 6
0030     __u32 fpmx_state;
0031 #endif
0032     __u32 fpexc;
0033     __u32 fpscr;
0034     /*
0035      * VFP implementation specific state
0036      */
0037     __u32 fpinst;
0038     __u32 fpinst2;
0039 
0040 #ifdef CONFIG_SMP
0041     __u32 cpu;
0042 #endif
0043 };
0044 
0045 union vfp_state {
0046     struct vfp_hard_struct  hard;
0047 };
0048 
0049 extern void vfp_flush_thread(union vfp_state *);
0050 extern void vfp_release_thread(union vfp_state *);
0051 
0052 #define FP_HARD_SIZE 35
0053 
0054 struct fp_hard_struct {
0055     unsigned int save[FP_HARD_SIZE];        /* as yet undefined */
0056 };
0057 
0058 #define FP_SOFT_SIZE 35
0059 
0060 struct fp_soft_struct {
0061     unsigned int save[FP_SOFT_SIZE];        /* undefined information */
0062 };
0063 
0064 #define IWMMXT_SIZE 0x98
0065 
0066 struct iwmmxt_struct {
0067     unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
0068 };
0069 
0070 union fp_state {
0071     struct fp_hard_struct   hard;
0072     struct fp_soft_struct   soft;
0073 #ifdef CONFIG_IWMMXT
0074     struct iwmmxt_struct    iwmmxt;
0075 #endif
0076 };
0077 
0078 #define FP_SIZE (sizeof(union fp_state) / sizeof(int))
0079 
0080 #endif
0081 
0082 #endif