arm64.h 984 B

123456789101112131415161718192021222324252627282930
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. // ARM64-specific macro definitions
  6. #pragma once
  7. #ifndef _M_ARM64
  8. #error Include arm64.h in builds of ARM64 targets only.
  9. #endif
  10. #define arm64_GET_CURRENT_FRAME() ((LPVOID)__getReg(29))
  11. extern "C" VOID arm64_SAVE_REGISTERS(void*);
  12. /*
  13. * The relevant part of the frame looks like this (high addresses at the top, low ones at the bottom):
  14. *
  15. * ----------------------
  16. * r3 <=== Homed input parameters
  17. * r2 <
  18. * r1 <
  19. * r0 <===
  20. * lr <=== return address
  21. * r11 <=== current r11 (frame pointer)
  22. * ...
  23. */
  24. const DWORD ReturnAddrOffsetFromFramePtr = 1;
  25. const DWORD ArgOffsetFromFramePtr = 2;