fpstate.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * arch/arm/include/asm/fpstate.h
  3. *
  4. * Copyright (C) 1995 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARM_FPSTATE_H
  11. #define __ASM_ARM_FPSTATE_H
  12. #ifndef __ASSEMBLY__
  13. /*
  14. * VFP storage area has:
  15. * - FPEXC, FPSCR, FPINST and FPINST2.
  16. * - 16 or 32 double precision data registers
  17. * - an implementation-dependent word of state for FLDMX/FSTMX (pre-ARMv6)
  18. *
  19. * FPEXC will always be non-zero once the VFP has been used in this process.
  20. */
  21. struct vfp_hard_struct {
  22. #ifdef CONFIG_VFPv3
  23. __u64 fpregs[32];
  24. #else
  25. __u64 fpregs[16];
  26. #endif
  27. #if __LINUX_ARM_ARCH__ < 6
  28. __u32 fpmx_state;
  29. #endif
  30. __u32 fpexc;
  31. __u32 fpscr;
  32. /*
  33. * VFP implementation specific state
  34. */
  35. __u32 fpinst;
  36. __u32 fpinst2;
  37. #ifdef CONFIG_SMP
  38. __u32 cpu;
  39. #endif
  40. };
  41. union vfp_state {
  42. struct vfp_hard_struct hard;
  43. };
  44. extern void vfp_flush_thread(union vfp_state *);
  45. extern void vfp_release_thread(union vfp_state *);
  46. #define FP_HARD_SIZE 35
  47. struct fp_hard_struct {
  48. unsigned int save[FP_HARD_SIZE]; /* as yet undefined */
  49. };
  50. #define FP_SOFT_SIZE 35
  51. struct fp_soft_struct {
  52. unsigned int save[FP_SOFT_SIZE]; /* undefined information */
  53. };
  54. #define IWMMXT_SIZE 0x98
  55. struct iwmmxt_struct {
  56. unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
  57. };
  58. union fp_state {
  59. struct fp_hard_struct hard;
  60. struct fp_soft_struct soft;
  61. #ifdef CONFIG_IWMMXT
  62. struct iwmmxt_struct iwmmxt;
  63. #endif
  64. };
  65. #define FP_SIZE (sizeof(union fp_state) / sizeof(int))
  66. struct crunch_state {
  67. unsigned int mvdx[16][2];
  68. unsigned int mvax[4][3];
  69. unsigned int dspsc[2];
  70. };
  71. #define CRUNCH_SIZE sizeof(struct crunch_state)
  72. #endif
  73. #endif