fpstate.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. #include <linux/config.h>
  13. #ifndef __ASSEMBLY__
  14. /*
  15. * VFP storage area has:
  16. * - FPEXC, FPSCR, FPINST and FPINST2.
  17. * - 16 double precision data registers
  18. * - an implementation-dependant word of state for FLDMX/FSTMX
  19. *
  20. * FPEXC will always be non-zero once the VFP has been used in this process.
  21. */
  22. struct vfp_hard_struct {
  23. __u64 fpregs[16];
  24. __u32 fpmx_state;
  25. __u32 fpexc;
  26. __u32 fpscr;
  27. /*
  28. * VFP implementation specific state
  29. */
  30. __u32 fpinst;
  31. __u32 fpinst2;
  32. };
  33. union vfp_state {
  34. struct vfp_hard_struct hard;
  35. };
  36. extern void vfp_flush_thread(union vfp_state *);
  37. extern void vfp_release_thread(union vfp_state *);
  38. #define FP_HARD_SIZE 35
  39. struct fp_hard_struct {
  40. unsigned int save[FP_HARD_SIZE]; /* as yet undefined */
  41. };
  42. #define FP_SOFT_SIZE 35
  43. struct fp_soft_struct {
  44. unsigned int save[FP_SOFT_SIZE]; /* undefined information */
  45. };
  46. #define IWMMXT_SIZE 0x98
  47. struct iwmmxt_struct {
  48. unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
  49. };
  50. union fp_state {
  51. struct fp_hard_struct hard;
  52. struct fp_soft_struct soft;
  53. #ifdef CONFIG_IWMMXT
  54. struct iwmmxt_struct iwmmxt;
  55. #endif
  56. };
  57. #define FP_SIZE (sizeof(union fp_state) / sizeof(int))
  58. #endif
  59. #endif