fpstate.h 1.5 KB

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