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.

95 lines
2.0 KiB

  1. //++
  2. // TITLE ("Performance Monitor Control & Data Register Accesses")
  3. //
  4. //
  5. //
  6. // Copyright (c) 1995 Intel Corporation
  7. //
  8. // Module Name:
  9. //
  10. // i64prfls.s
  11. //
  12. // Abstract:
  13. //
  14. // This module implements Profiling.
  15. //
  16. // Author:
  17. //
  18. // Bernard Lint, M. Jayakumar 1 Sep '99
  19. //
  20. // Environment:
  21. //
  22. // Kernel mode
  23. //
  24. // Revision History:
  25. //
  26. //--
  27. #include "ksia64.h"
  28. .file "i64prfls.s"
  29. //
  30. // The following functions are defined until the compiler supports
  31. // the intrinsics __setReg() and __getReg() for the CV_IA64_PFCx,
  32. // CV_IA64_PFDx and CV_IA64_SaPMV registers.
  33. // Anyway, these functions might stay for a while, the compiler
  34. // having no consideration for micro-architecture specific
  35. // number of PMCs/PMDs.
  36. //
  37. LEAF_ENTRY(HalpReadPerfMonVectorReg)
  38. LEAF_SETUP(0,0,0,0)
  39. mov v0 = cr.pmv
  40. ;;
  41. LEAF_RETURN
  42. LEAF_EXIT(HalpReadPerfMonVectorReg)
  43. LEAF_ENTRY(HalpWritePerfMonVectorReg)
  44. LEAF_SETUP(1,0,0,0)
  45. mov cr.pmv = a0
  46. ;;
  47. LEAF_RETURN
  48. LEAF_EXIT(HalpWritePerfMonVectorReg)
  49. LEAF_ENTRY(HalpWritePerfMonCnfgReg)
  50. LEAF_SETUP(2,0,0,0)
  51. rPMC = t15
  52. mov rPMC = a0
  53. ;;
  54. mov pmc[rPMC] = a1
  55. ;;
  56. LEAF_RETURN
  57. LEAF_EXIT(HalpWritePerfMonCnfgReg)
  58. LEAF_ENTRY(HalpReadPerfMonCnfgReg)
  59. LEAF_SETUP(1,0,0,0)
  60. rPMC = t15
  61. mov rPMC = a0
  62. ;;
  63. mov v0 = pmc[rPMC]
  64. ;;
  65. LEAF_RETURN
  66. LEAF_EXIT(HalpReadPerfMonCnfgReg)
  67. LEAF_ENTRY(HalpWritePerfMonDataReg)
  68. LEAF_SETUP(2,0,0,0)
  69. rPMD = t15
  70. mov rPMD = a0
  71. ;;
  72. mov pmd[rPMD] = a1
  73. ;;
  74. LEAF_RETURN
  75. LEAF_EXIT(HalpWritePerfMonDataReg)
  76. LEAF_ENTRY(HalpReadPerfMonDataReg)
  77. LEAF_SETUP(1,0,0,0)
  78. rPMD = t15
  79. mov rPMD = a0
  80. ;;
  81. mov v0 = pmd[rPMD]
  82. ;;
  83. LEAF_RETURN
  84. LEAF_EXIT(HalpReadPerfMonDataReg)