Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

192 lines
5.4 KiB

  1. /******************************
  2. Intel Confidential
  3. ******************************/
  4. #ifndef _EM_SUPPORT_H
  5. #define _EM_SUPPORT_H
  6. void
  7. fp82_EM_initialize_state(EM_state_type *ps);
  8. EM_boolean_t
  9. fp82_fp_software_assistance_required(EM_state_type *,
  10. EM_opcode_type, ...);
  11. /*******************************************************
  12. Fault handlers -- Start
  13. ********************************************************/
  14. /*******************************************************
  15. Defines to get rid of ps in the function declaration
  16. ********************************************************/
  17. #define disabled_fp_register_fault(arg1, arg2) \
  18. fp82_disabled_fp_register_fault(EM_state_type *ps, arg1, arg2)
  19. #define fp_exception_fault(arg1) \
  20. fp82_fp_exception_fault(EM_state_type *ps, arg1)
  21. #define fp_exception_trap(arg1) \
  22. fp82_fp_exception_trap(EM_state_type *ps, arg1)
  23. #define illegal_operation_fault(arg1) \
  24. fp82_illegal_operation_fault(EM_state_type *ps, arg1)
  25. #define check_target_register(arg1, arg2) \
  26. fp82_check_target_register(EM_state_type *ps, arg1, arg2)
  27. #define fp_check_target_register(arg1) \
  28. fp82_fp_check_target_register(EM_state_type *ps, arg1)
  29. /*******************************************************
  30. Fault prototypes
  31. ********************************************************/
  32. INLINE void
  33. disabled_fp_register_fault(EM_uint_t isr_code, EM_uint_t itype);
  34. INLINE void
  35. fp_exception_fault(EM_uint_t isr_code);
  36. INLINE void
  37. fp_exception_trap(EM_uint_t isr_code);
  38. INLINE void
  39. illegal_operation_fault(EM_uint_t non_rs);
  40. INLINE void
  41. check_target_register(EM_uint_t reg_specifier, EM_uint_t itype);
  42. void
  43. fp_check_target_register(EM_uint_t reg_specifier);
  44. /*******************************************************
  45. Fault handlers -- End
  46. ********************************************************/
  47. /*******************************************************
  48. GET PUT functions
  49. ********************************************************/
  50. /*******************************************************
  51. Defines to get rid of ps in GET PUT functions
  52. ********************************************************/
  53. #define GETSTATE_F1(qp,f1,f3,f4,f2) _GETSTATE_F1(EM_state_type *ps, qp,f1,f3,f4,f2)
  54. #define PUTSTATE_F1(f1) _PUTSTATE_F1(EM_state_type *ps, f1)
  55. #define GETSTATE_F4(qp,p1,p2,f2,f3) _GETSTATE_F4(EM_state_type *ps, qp,p1,p2,f2,f3)
  56. #define PUTSTATE_F4(p1,p2) _PUTSTATE_F4(EM_state_type *ps, p1,p2)
  57. #define GETSTATE_F6(qp,f1,p2,f2,f3) _GETSTATE_F6(EM_state_type *ps,qp,f1,p2,f2,f3)
  58. #define PUTSTATE_F6(f1,p2) _PUTSTATE_F6(EM_state_type *ps,f1,p2)
  59. #define GETSTATE_F7(qp,f1,p2,f3) _GETSTATE_F7(EM_state_type *ps, qp,f1,p2,f3)
  60. #define PUTSTATE_F7(f1,p2) _PUTSTATE_F7(EM_state_type *ps, f1,p2)
  61. #define GETSTATE_F8(qp,f1,f2,f3) _GETSTATE_F8(EM_state_type *ps, qp,f1,f2,f3)
  62. #define PUTSTATE_F8(f1) _PUTSTATE_F8(EM_state_type *ps, f1)
  63. #define GETSTATE_F10(qp,f1,f2) _GETSTATE_F10(EM_state_type *ps, qp,f1,f2)
  64. #define PUTSTATE_F10(f1) _PUTSTATE_F10(EM_state_type *ps, f1)
  65. /*******************************************************
  66. Prototypes for GET PUT functions
  67. ********************************************************/
  68. void
  69. GETSTATE_F1(
  70. EM_pred_reg_specifier Pr0,
  71. EM_fp_reg_specifier Fr1,
  72. EM_fp_reg_specifier Fr3,
  73. EM_fp_reg_specifier Fr4,
  74. EM_fp_reg_specifier Fr2);
  75. void
  76. PUTSTATE_F1(
  77. EM_fp_reg_specifier Fr1);
  78. void
  79. GETSTATE_F4(
  80. EM_pred_reg_specifier Pr0,
  81. EM_pred_reg_specifier Pr1,
  82. EM_pred_reg_specifier Pr2,
  83. EM_fp_reg_specifier Fr2,
  84. EM_fp_reg_specifier Fr3);
  85. void
  86. PUTSTATE_F4(
  87. EM_pred_reg_specifier Pr1,
  88. EM_pred_reg_specifier Pr2);
  89. void
  90. GETSTATE_F6(
  91. EM_pred_reg_specifier Pr0,
  92. EM_fp_reg_specifier Fr1,
  93. EM_pred_reg_specifier Pr2,
  94. EM_fp_reg_specifier Fr2,
  95. EM_fp_reg_specifier Fr3);
  96. void
  97. PUTSTATE_F6(
  98. EM_fp_reg_specifier Fr1,
  99. EM_pred_reg_specifier Pr2);
  100. void
  101. GETSTATE_F7(
  102. EM_pred_reg_specifier Pr0,
  103. EM_fp_reg_specifier Fr1,
  104. EM_pred_reg_specifier Pr2,
  105. EM_fp_reg_specifier Fr3);
  106. void
  107. PUTSTATE_F7(
  108. EM_fp_reg_specifier Fr1,
  109. EM_pred_reg_specifier Pr2);
  110. void
  111. GETSTATE_F8(
  112. EM_pred_reg_specifier Pr0,
  113. EM_fp_reg_specifier Fr1,
  114. EM_fp_reg_specifier Fr2,
  115. EM_fp_reg_specifier Fr3);
  116. void
  117. PUTSTATE_F8(
  118. EM_fp_reg_specifier Fr1);
  119. void
  120. GETSTATE_F10(
  121. EM_pred_reg_specifier Pr0,
  122. EM_fp_reg_specifier Fr1,
  123. EM_fp_reg_specifier Fr2);
  124. void
  125. PUTSTATE_F10(
  126. EM_fp_reg_specifier Fr1);
  127. /******************************************************************************/
  128. /* Define macros to make transformation to the EAS easier */
  129. /******************************************************************************/
  130. #define get_bit(val, bit) \
  131. ((val >> bit) &0x1)
  132. /******************************************************************************/
  133. /* Define macros to simplify access to the fp82_ functions. This is done so */
  134. /* the namespace doesn't get cluttered, while retaining convenient access. */
  135. /* The FP82_NO_SHORTCUTS macro can be defined to prevent creation of these. */
  136. /******************************************************************************/
  137. #ifndef FP82_NO_SHORTCUTS
  138. #define EM_initialize_state fp82_EM_initialize_state
  139. #define fp_software_assistance_required fp82_fp_software_assistance_required
  140. #endif /* FP82_NO_SHORTCUTS */
  141. #endif /* _EM_SUPPORT_H */