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.

71 lines
957 B

  1. //
  2. //
  3. // Module Name: miscs.s
  4. //
  5. // Description:
  6. //
  7. // miscellaneous assembly functions used by hal.
  8. //
  9. // Target Platform:
  10. //
  11. // IA-64
  12. //
  13. // Reuse: None
  14. //
  15. //
  16. #include "regia64.h"
  17. #include "kxia64.h"
  18. //++
  19. // Name: HalpLockedIncrementUlong(Sync)
  20. //
  21. // Routine Description:
  22. //
  23. // Atomically increment a variable.
  24. //
  25. // Arguments:
  26. //
  27. // Sync: Synchronization variable
  28. //
  29. // Return Value: NONE
  30. //
  31. //--
  32. LEAF_ENTRY(HalpLockedIncrementUlong)
  33. LEAF_SETUP(1,2,0,0)
  34. ARGPTR(a0)
  35. ;;
  36. fetchadd4.acq.nt1 t1 = [a0], 1
  37. ;;
  38. LEAF_RETURN
  39. LEAF_EXIT(HalpLockedIncrementUlong)
  40. //++
  41. // Name: HalpGetReturnAddress()
  42. //
  43. // Routine Description:
  44. //
  45. // Returns b0
  46. //
  47. // Arguments:
  48. //
  49. // NONE
  50. //
  51. // Return Value: b0
  52. //
  53. //--
  54. LEAF_ENTRY(HalpGetReturnAddress)
  55. LEAF_SETUP(0,2,0,0)
  56. mov v0 = b0
  57. ;;
  58. LEAF_RETURN
  59. LEAF_EXIT(HalpGetReturnAddress)