Thunks.asm 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. OPT 2 ; disable listing
  6. #include "ksarm64.h"
  7. OPT 1 ; re-enable listing
  8. TTL Lib\Backend\arm64\Thunks.asm
  9. ;Js::Var NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject* function, Js::CallInfo callInfo, ...)
  10. EXPORT |?CheckCodeGenThunk@NativeCodeGenerator@@SAPEAXPEAVRecyclableObject@Js@@UCallInfo@3@ZZ|
  11. ;Js::JavascriptMethod NativeCodeGenerator::CheckCodeGen(Js::JavascriptFunction * function)
  12. IMPORT |?CheckCodeGen@NativeCodeGenerator@@SAP6APEAXPEAVRecyclableObject@Js@@UCallInfo@3@ZZPEAVScriptFunction@3@@Z|
  13. TEXTAREA
  14. ;;============================================================================================================
  15. ; NativeCodeGenerator::CheckCodeGenThunk
  16. ;;============================================================================================================
  17. ;Js::Var NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject* function, Js::CallInfo callInfo, ...)
  18. NESTED_ENTRY ?CheckCodeGenThunk@NativeCodeGenerator@@SAPEAXPEAVRecyclableObject@Js@@UCallInfo@3@ZZ
  19. PROLOG_SAVE_REG_PAIR fp, lr, #-80! ; save volatile registers
  20. stp x0, x1, [sp, #16]
  21. stp x2, x3, [sp, #32]
  22. stp x4, x5, [sp, #48]
  23. stp x6, x7, [sp, #64]
  24. bl |?CheckCodeGen@NativeCodeGenerator@@SAP6APEAXPEAVRecyclableObject@Js@@UCallInfo@3@ZZPEAVScriptFunction@3@@Z| ; call NativeCodeGenerator::CheckCodeGen
  25. mov x16, x0 ; back up entryPoint in R16
  26. ldp x6, x7, [sp, #64] ; restore arguments and return address
  27. ldp x4, x5, [sp, #48]
  28. ldp x2, x3, [sp, #32]
  29. ldp x0, x1, [sp, #16]
  30. EPILOG_RESTORE_REG_PAIR fp, lr, #80!
  31. EPILOG_NOP br x16 ; jump (tail call) to new entryPoint
  32. NESTED_END
  33. ;;============================================================================================================
  34. END