Thunks.asm 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #if defined(_CONTROL_FLOW_GUARD)
  14. IMPORT __guard_check_icall_fptr
  15. #endif
  16. TEXTAREA
  17. ;;============================================================================================================
  18. ; NativeCodeGenerator::CheckCodeGenThunk
  19. ;;============================================================================================================
  20. ;Js::Var NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject* function, Js::CallInfo callInfo, ...)
  21. NESTED_ENTRY ?CheckCodeGenThunk@NativeCodeGenerator@@SAPEAXPEAVRecyclableObject@Js@@UCallInfo@3@ZZ
  22. PROLOG_SAVE_REG_PAIR fp, lr, #-(2*8+16*8)! ; establish stack frame
  23. stp d0, d1, [sp, #16+0*8]
  24. stp d2, d3, [sp, #16+2*8]
  25. stp d4, d5, [sp, #16+4*8]
  26. stp d6, d7, [sp, #16+6*8]
  27. stp x0, x1, [sp, #16+8*8]
  28. stp x2, x3, [sp, #16+10*8]
  29. stp x4, x5, [sp, #16+12*8]
  30. stp x6, x7, [sp, #16+14*8]
  31. bl |?CheckCodeGen@NativeCodeGenerator@@SAP6APEAXPEAVRecyclableObject@Js@@UCallInfo@3@ZZPEAVScriptFunction@3@@Z| ; call NativeCodeGenerator::CheckCodeGen
  32. mov x15, x0 ; move entry point to x15
  33. #if defined(_CONTROL_FLOW_GUARD)
  34. adrp x17, __guard_check_icall_fptr
  35. ldr x17, [x17, __guard_check_icall_fptr]
  36. blr x17
  37. #endif
  38. ldp d0, d1, [sp, #16+0*8]
  39. ldp d2, d3, [sp, #16+2*8]
  40. ldp d4, d5, [sp, #16+4*8]
  41. ldp d6, d7, [sp, #16+6*8]
  42. ldp x0, x1, [sp, #16+8*8]
  43. ldp x2, x3, [sp, #16+10*8]
  44. ldp x4, x5, [sp, #16+12*8]
  45. ldp x6, x7, [sp, #16+14*8]
  46. EPILOG_RESTORE_REG_PAIR fp, lr, #(2*8+16*8)!
  47. EPILOG_NOP br x15 ; jump (tail call) to new entryPoint
  48. NESTED_END
  49. ;;============================================================================================================
  50. END