fpstate.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. };
  34. union vfp_state {
  35. struct vfp_hard_struct hard;
  36. };
  37. extern void vfp_flush_thread(union vfp_state *);
  38. extern void vfp_release_thread(union vfp_state *);
  39. #define FP_HARD_SIZE 35
  40. struct fp_hard_struct {
  41. unsigned int save[FP_HARD_SIZE]; /* as yet undefined */
  42. };
  43. #define FP_SOFT_SIZE 35
  44. struct fp_soft_struct {
  45. unsigned int save[FP_SOFT_SIZE]; /* undefined information */
  46. };
  47. #define IWMMXT_SIZE 0x98
  48. struct iwmmxt_struct {
  49. unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
  50. };
  51. union fp_state {
  52. struct fp_hard_struct hard;
  53. struct fp_soft_struct soft;
  54. #ifdef CONFIG_IWMMXT
  55. struct iwmmxt_struct iwmmxt;
  56. #endif
  57. };
  58. #define FP_SIZE (sizeof(union fp_state) / sizeof(int))
  59. struct crunch_state {
  60. unsigned int mvdx[16][2];
  61. unsigned int mvax[4][3];
  62. unsigned int dspsc[2];
  63. };
  64. #define CRUNCH_SIZE sizeof(struct crunch_state)
  65. #endif
  66. #endif