fpstate.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * linux/include/asm-arm/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 double precision data registers
  17. * - an implementation-dependant word of state for FLDMX/FSTMX
  18. *
  19. * FPEXC will always be non-zero once the VFP has been used in this process.
  20. */
  21. struct vfp_hard_struct {
  22. __u64 fpregs[16];
  23. #if __LINUX_ARM_ARCH__ < 6
  24. __u32 fpmx_state;
  25. #endif
  26. __u32 fpexc;
  27. __u32 fpscr;
  28. /*
  29. * VFP implementation specific state
  30. */
  31. __u32 fpinst;
  32. __u32 fpinst2;
  33. #ifdef CONFIG_SMP
  34. __u32 cpu;
  35. #endif
  36. };
  37. union vfp_state {
  38. struct vfp_hard_struct hard;
  39. };
  40. extern void vfp_flush_thread(union vfp_state *);
  41. extern void vfp_release_thread(union vfp_state *);
  42. #define FP_HARD_SIZE 35
  43. struct fp_hard_struct {
  44. unsigned int save[FP_HARD_SIZE]; /* as yet undefined */
  45. };
  46. #define FP_SOFT_SIZE 35
  47. struct fp_soft_struct {
  48. unsigned int save[FP_SOFT_SIZE]; /* undefined information */
  49. };
  50. #define IWMMXT_SIZE 0x98
  51. struct iwmmxt_struct {
  52. unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
  53. };
  54. union fp_state {
  55. struct fp_hard_struct hard;
  56. struct fp_soft_struct soft;
  57. #ifdef CONFIG_IWMMXT
  58. struct iwmmxt_struct iwmmxt;
  59. #endif
  60. };
  61. #define FP_SIZE (sizeof(union fp_state) / sizeof(int))
  62. struct crunch_state {
  63. unsigned int mvdx[16][2];
  64. unsigned int mvax[4][3];
  65. unsigned int dspsc[2];
  66. };
  67. #define CRUNCH_SIZE sizeof(struct crunch_state)
  68. #endif
  69. #endif