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.

112 lines
3.8 KiB

  1. /******************************
  2. Intel Confidential
  3. ******************************/
  4. #ifndef _EM_STATE_H
  5. #define _EM_STATE_H
  6. /*****************************/
  7. /* Processor's State */
  8. /*****************************/
  9. #ifndef FPSR
  10. #define FPSR ps->state_AR[ar_fpsr].fpsr
  11. #endif
  12. #ifndef FPSR_value
  13. #define FPSR_value ps->state_AR[ar_fpsr].uint_value
  14. #endif
  15. #ifndef PSR
  16. #define PSR ps->state_PSR
  17. #endif
  18. #ifndef IP
  19. #define IP ps->state_IP
  20. #endif
  21. #ifndef AR
  22. #define AR ps->state_AR
  23. #endif
  24. #ifndef FR
  25. #define FR ps->state_FR
  26. #endif
  27. #ifndef GR
  28. #define GR ps->state_GR
  29. #endif
  30. #ifndef PR
  31. #define PR ps->state_PR
  32. #endif
  33. #ifndef MEM
  34. #define MEM ps->state_MEM
  35. #endif
  36. #ifndef UM
  37. #define UM ps->state_PSR
  38. #endif
  39. #define FPSR_traps (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>> 0)&0x3F)
  40. #define FPSR_sf0_flags (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>>13)&0x3F)
  41. #define FPSR_sf1_flags (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>>26)&0x3F)
  42. #define FPSR_sf2_flags (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>>39)&0x3F)
  43. #define FPSR_sf3_flags (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>>52)&0x3F)
  44. #define FPSR_sf0_controls (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>> 6)&0x7F)
  45. #define FPSR_sf1_controls (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>>19)&0x7F)
  46. #define FPSR_sf2_controls (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>>32)&0x7F)
  47. #define FPSR_sf3_controls (EM_uint_t)((ps->state_AR[ar_fpsr].uint_value>>45)&0x7F)
  48. #define GENERAL_FORM ps->state_form.general_form
  49. #define DATA_FORM ps->state_form.data_form
  50. #define CONTROL_FORM ps->state_form.control_form
  51. #define FP82_FLOATING_FORM ps->state_form.fp82_floating_form
  52. #define CLEAR_FORM ps->state_form.clear_form
  53. #define NO_CLEAR_FORM ps->state_form.no_clear_form
  54. #define HIGH_UNSIGNED_FORM ps->state_form.high_unsigned_form
  55. #define LOW_FORM ps->state_form.low_form
  56. #define HIGH_FORM ps->state_form.high_form
  57. #define NEG_SIGN_FORM ps->state_form.neg_sign_form
  58. #define SIGN_FORM ps->state_form.sign_form
  59. #define SIGN_EXP_FORM ps->state_form.sign_exp_form
  60. #define MIX_L_FORM ps->state_form.mix_l_form
  61. #define MIX_R_FORM ps->state_form.mix_r_form
  62. #define MIX_LR_FORM ps->state_form.mix_lr_form
  63. #define SXT_L_FORM ps->state_form.sxt_l_form
  64. #define SXT_R_FORM ps->state_form.sxt_r_form
  65. #define PACK_FORM ps->state_form.pack_form
  66. #define SWAP_FORM ps->state_form.swap_form
  67. #define SWAP_NL_FORM ps->state_form.swap_nl_form
  68. #define SWAP_NR_FORM ps->state_form.swap_nr_form
  69. #define SIGNED_FORM ps->state_form.signed_form
  70. #define TRUNC_FORM ps->state_form.trunc_form
  71. #define UNSIGNED_FORM ps->state_form.unsigned_form
  72. #define SINGLE_FORM ps->state_form.single_form
  73. #define DOUBLE_FORM ps->state_form.double_form
  74. #define EXPONENT_FORM ps->state_form.exponent_form
  75. #define SIGNIFICAND_FORM ps->state_form.significand_form
  76. #define NO_BASE_UPDATE_FORM ps->state_form.no_base_update_form
  77. #define REGISTER_BASE_UPDATE_FORM ps->state_form.register_base_update_form
  78. #define IMMEDIATE_BASE_UPDATE_FORM ps->state_form.immediate_base_update_form
  79. #define FCHECK_BRANCH_IMPLEMENTED ps->state_form.fcheck_branch_implemented
  80. /*
  81. The following concern software assistance. For an implementation-determined
  82. software assistance fault or trap to occur (when encountering
  83. denormals MERCED_RTL must be 1. An architecturally-mandated swa
  84. can still occur when MERCED_RTL is 0. Such an assist occurs in frcpa and
  85. fprcpa.
  86. */
  87. #define MERCED_RTL ps->state_MERCED_RTL
  88. #endif /* _EM_STATE_H */