fpstate.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * arch/arm/include/asm/fpstate.h
  4. *
  5. * Copyright (C) 1995 Russell King
  6. */
  7. #ifndef __ASM_ARM_FPSTATE_H
  8. #define __ASM_ARM_FPSTATE_H
  9. #ifndef __ASSEMBLY__
  10. /*
  11. * VFP storage area has:
  12. * - FPEXC, FPSCR, FPINST and FPINST2.
  13. * - 16 or 32 double precision data registers
  14. * - an implementation-dependent word of state for FLDMX/FSTMX (pre-ARMv6)
  15. *
  16. * FPEXC will always be non-zero once the VFP has been used in this process.
  17. */
  18. struct vfp_hard_struct {
  19. #ifdef CONFIG_VFPv3
  20. __u64 fpregs[32];
  21. #else
  22. __u64 fpregs[16];
  23. #endif
  24. #if __LINUX_ARM_ARCH__ < 6
  25. __u32 fpmx_state;
  26. #endif
  27. __u32 fpexc;
  28. __u32 fpscr;
  29. /*
  30. * VFP implementation specific state
  31. */
  32. __u32 fpinst;
  33. __u32 fpinst2;
  34. #ifdef CONFIG_SMP
  35. __u32 cpu;
  36. #endif
  37. };
  38. union vfp_state {
  39. struct vfp_hard_struct hard;
  40. };
  41. #define FP_HARD_SIZE 35
  42. struct fp_hard_struct {
  43. unsigned int save[FP_HARD_SIZE]; /* as yet undefined */
  44. };
  45. #define FP_SOFT_SIZE 35
  46. struct fp_soft_struct {
  47. unsigned int save[FP_SOFT_SIZE]; /* undefined information */
  48. };
  49. #define IWMMXT_SIZE 0x98
  50. struct iwmmxt_struct {
  51. unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
  52. };
  53. union fp_state {
  54. struct fp_hard_struct hard;
  55. struct fp_soft_struct soft;
  56. #ifdef CONFIG_IWMMXT
  57. struct iwmmxt_struct iwmmxt;
  58. #endif
  59. };
  60. #define FP_SIZE (sizeof(union fp_state) / sizeof(int))
  61. #endif
  62. #endif