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.

122 lines
1.9 KiB

  1. #include "ksia64.h"
  2. #if 0
  3. //++
  4. //
  5. // VOID
  6. //++
  7. //
  8. // VOID
  9. // KeFlushCurrentTb (
  10. // )
  11. //
  12. // Routine Description:
  13. //
  14. // This function flushes the entire translation buffer.
  15. //
  16. // Arguments:
  17. //
  18. // None.
  19. //
  20. // Return Value:
  21. //
  22. // None.
  23. //
  24. // Algorithm:
  25. //
  26. //--
  27. LEAF_ENTRY(KeFlushCurrentTb)
  28. ptc.e r0
  29. ;;
  30. srlz.d
  31. LEAF_RETURN
  32. LEAF_EXIT(KeFlushCurrentTb)
  33. #endif
  34. //++
  35. //
  36. // VOID
  37. // KiPurgeTranslationCache (
  38. // ULONGLONG Base,
  39. // ULONGLONG Stride1,
  40. // ULONGLONG Stride2,
  41. // ULONGLONG Count1,
  42. // ULONGLONG Count2
  43. // )
  44. //
  45. // Routine Description:
  46. //
  47. // This function flushes the entire translation cache from the current processor.
  48. //
  49. // Arguments:
  50. //
  51. // r32 - base
  52. // r33 - stride1
  53. // r34 - stride2
  54. // r35 - count1
  55. // r36 - count2
  56. //
  57. // Return Value:
  58. //
  59. // None.
  60. //
  61. // Algorithm:
  62. //
  63. // for (i = 0; i < count1; i++) {
  64. // for (j = 0; j < count2; j++) {
  65. // ptc.e addr;
  66. // addr += stride2;
  67. // }
  68. // addr += stride1;
  69. // }
  70. //
  71. //--
  72. LEAF_ENTRY(KiPurgeTranslationCache)
  73. PROLOGUE_BEGIN
  74. alloc r31 = 5, 0, 0, 0
  75. cmp.ge p14,p15=r0, r35
  76. rsm 1 << PSR_I
  77. .save ar.lc, r30
  78. mov.i r30=ar.lc
  79. (p14) br.cond.dpnt.few $L150#;;
  80. PROLOGUE_END
  81. $L148:
  82. cmp.ge p14,p15=r0, r36
  83. adds r31=-1, r36
  84. (p14) br.cond.dpnt.few $L153#;;
  85. nop.m 0
  86. nop.f 0
  87. mov.i ar.lc=r31
  88. ;;
  89. $L151:
  90. ptc.e r32
  91. add r32=r32, r34
  92. br.cloop.dptk.many $L151#;;
  93. $L153:
  94. adds r35=-1, r35
  95. add r32=r32, r33;;
  96. cmp.ltu p14,p15=r0, r35
  97. nop.m 0
  98. nop.f 0
  99. (p14) br.cond.dptk.few $L148#;;
  100. $L150:
  101. srlz.i
  102. ssm 1 << PSR_I
  103. mov.i ar.lc=r30
  104. br.ret.sptk.few b0;;
  105. LEAF_EXIT(KiPurgeTranslationCache)