vfp.h
上传用户:szlgq88
上传日期:2009-04-28
资源大小:48287k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * linux/include/asm-arm/vfp.h
  3.  *
  4.  * VFP register definitions.
  5.  * First, the standard VFP set.
  6.  */
  7. #define FPSID cr0
  8. #define FPSCR cr1
  9. #define FPEXC cr8
  10. /* FPSID bits */
  11. #define FPSID_IMPLEMENTER_BIT (24)
  12. #define FPSID_IMPLEMENTER_MASK (0xff << FPSID_IMPLEMENTER_BIT)
  13. #define FPSID_SOFTWARE (1<<23)
  14. #define FPSID_FORMAT_BIT (21)
  15. #define FPSID_FORMAT_MASK (0x3  << FPSID_FORMAT_BIT)
  16. #define FPSID_NODOUBLE (1<<20)
  17. #define FPSID_ARCH_BIT (16)
  18. #define FPSID_ARCH_MASK (0xF  << FPSID_ARCH_BIT)
  19. #define FPSID_PART_BIT (8)
  20. #define FPSID_PART_MASK (0xFF << FPSID_PART_BIT)
  21. #define FPSID_VARIANT_BIT (4)
  22. #define FPSID_VARIANT_MASK (0xF  << FPSID_VARIANT_BIT)
  23. #define FPSID_REV_BIT (0)
  24. #define FPSID_REV_MASK (0xF  << FPSID_REV_BIT)
  25. /* FPEXC bits */
  26. #define FPEXC_EXCEPTION (1<<31)
  27. #define FPEXC_ENABLE (1<<30)
  28. /* FPSCR bits */
  29. #define FPSCR_DEFAULT_NAN (1<<25)
  30. #define FPSCR_FLUSHTOZERO (1<<24)
  31. #define FPSCR_ROUND_NEAREST (0<<22)
  32. #define FPSCR_ROUND_PLUSINF (1<<22)
  33. #define FPSCR_ROUND_MINUSINF (2<<22)
  34. #define FPSCR_ROUND_TOZERO (3<<22)
  35. #define FPSCR_RMODE_BIT (22)
  36. #define FPSCR_RMODE_MASK (3 << FPSCR_RMODE_BIT)
  37. #define FPSCR_STRIDE_BIT (20)
  38. #define FPSCR_STRIDE_MASK (3 << FPSCR_STRIDE_BIT)
  39. #define FPSCR_LENGTH_BIT (16)
  40. #define FPSCR_LENGTH_MASK (7 << FPSCR_LENGTH_BIT)
  41. #define FPSCR_IOE (1<<8)
  42. #define FPSCR_DZE (1<<9)
  43. #define FPSCR_OFE (1<<10)
  44. #define FPSCR_UFE (1<<11)
  45. #define FPSCR_IXE (1<<12)
  46. #define FPSCR_IDE (1<<15)
  47. #define FPSCR_IOC (1<<0)
  48. #define FPSCR_DZC (1<<1)
  49. #define FPSCR_OFC (1<<2)
  50. #define FPSCR_UFC (1<<3)
  51. #define FPSCR_IXC (1<<4)
  52. #define FPSCR_IDC (1<<7)
  53. /*
  54.  * VFP9-S specific.
  55.  */
  56. #define FPINST cr9
  57. #define FPINST2 cr10
  58. /* FPEXC bits */
  59. #define FPEXC_FPV2 (1<<28)
  60. #define FPEXC_LENGTH_BIT (8)
  61. #define FPEXC_LENGTH_MASK (7 << FPEXC_LENGTH_BIT)
  62. #define FPEXC_INV (1 << 7)
  63. #define FPEXC_UFC (1 << 3)
  64. #define FPEXC_OFC (1 << 2)
  65. #define FPEXC_IOC (1 << 0)
  66. /* Bit patterns for decoding the packaged operation descriptors */
  67. #define VFPOPDESC_LENGTH_BIT (9)
  68. #define VFPOPDESC_LENGTH_MASK (0x07 << VFPOPDESC_LENGTH_BIT)
  69. #define VFPOPDESC_UNUSED_BIT (24)
  70. #define VFPOPDESC_UNUSED_MASK (0xFF << VFPOPDESC_UNUSED_BIT)
  71. #define VFPOPDESC_OPDESC_MASK (~(VFPOPDESC_LENGTH_MASK | VFPOPDESC_UNUSED_MASK))