Welcome to mirror list, hosted at ThFree Co, Russian Federation.

InteropThunksHelpers.S « amd64 « Runtime « Native « src - github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6e1e2feba4a6fbc7e6a885c6d3d9360f61c39963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// 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 <AsmOffsets.inc>         // generated by the build from AsmOffsets.cpp
#include <unixasmmacros.inc>
#define POINTER_SIZE 8

LEAF_ENTRY RhCommonStub, _TEXT

    PUSH_ARGUMENT_REGISTERS
    push_register    r10

    alloc_stack    SIZEOF_FP_REGS 
    SAVE_FLOAT_ARGUMENT_REGISTERS 0 

    INLINE_GET_TLS_VAR  tls_thunkData

    RESTORE_FLOAT_ARGUMENT_REGISTERS 0 
    free_stack    SIZEOF_FP_REGS

    pop_register    r10
    POP_ARGUMENT_REGISTERS

    mov    r11, [r10]
    mov    qword ptr [rax], r11

    mov    rax, [r10 + POINTER_SIZE]
    jmp    rax
LEAF_END RhCommonStub, _TEXT


LEAF_ENTRY RhGetCommonStubAddress, _TEXT
    lea rax, [rip + C_FUNC(RhCommonStub)]
    ret 
LEAF_END RhGetCommonStubAddress, _TEXT


LEAF_ENTRY RhGetCurrentThunkContext, _TEXT

    INLINE_GET_TLS_VAR  tls_thunkData

    mov    rax, qword ptr [rax]   
    ret
LEAF_END RhGetCurrentThunkContext, _TEXT