diff options
Diffstat (limited to 'src/pal/src/arch/amd64/activationhandlerwrapper.S')
-rw-r--r-- | src/pal/src/arch/amd64/activationhandlerwrapper.S | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/pal/src/arch/amd64/activationhandlerwrapper.S b/src/pal/src/arch/amd64/activationhandlerwrapper.S new file mode 100644 index 0000000000..63f718e81f --- /dev/null +++ b/src/pal/src/arch/amd64/activationhandlerwrapper.S @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +.intel_syntax noprefix +#include "unixasmmacros.inc" +#include "asmconstants.h" + +#ifdef BIT64 +// Offset of the return address from the ActivationHandler in the ActivationHandlerWrapper +.globl C_FUNC(ActivationHandlerReturnOffset) +C_FUNC(ActivationHandlerReturnOffset): + .int LOCAL_LABEL(ActivationHandlerReturn)-C_FUNC(ActivationHandlerWrapper) + +NESTED_ENTRY ActivationHandlerWrapper, _TEXT, NoHandler + push_nonvol_reg rbp + mov rbp, rsp + alloc_stack (CONTEXT_Size) + set_cfa_register rbp, (2*8) + mov rdi, rsp + int3 + call C_FUNC(ActivationHandler) +LOCAL_LABEL(ActivationHandlerReturn): + int3 + free_stack (CONTEXT_Size) + pop_nonvol_reg rbp + ret +NESTED_END ActivationHandlerWrapper, _TEXT + +#endif // BIT64 |