1/* SPDX-License-Identifier: GPL-2.0 */
2/**
3* Copyright(c) 2016-20 Intel Corporation.
4*/
5
6 .text
7
8 .global sgx_enter_enclave
9sgx_enter_enclave:
10 .cfi_startproc
11 push %r15
12 .cfi_adjust_cfa_offset 8
13 .cfi_rel_offset %r15, 0
14 push %r14
15 .cfi_adjust_cfa_offset 8
16 .cfi_rel_offset %r14, 0
17 push %r13
18 .cfi_adjust_cfa_offset 8
19 .cfi_rel_offset %r13, 0
20 push %r12
21 .cfi_adjust_cfa_offset 8
22 .cfi_rel_offset %r12, 0
23 push %rbx
24 .cfi_adjust_cfa_offset 8
25 .cfi_rel_offset %rbx, 0
26 push $0
27 .cfi_adjust_cfa_offset 8
28 push 0x38(%rsp)
29 .cfi_adjust_cfa_offset 8
30 call *vdso_sgx_enter_enclave(%rip)
31 add $0x10, %rsp
32 .cfi_adjust_cfa_offset -0x10
33 pop %rbx
34 .cfi_adjust_cfa_offset -8
35 pop %r12
36 .cfi_adjust_cfa_offset -8
37 pop %r13
38 .cfi_adjust_cfa_offset -8
39 pop %r14
40 .cfi_adjust_cfa_offset -8
41 pop %r15
42 .cfi_adjust_cfa_offset -8
43 ret
44 .cfi_endproc
45

source code of linux/tools/testing/selftests/sgx/call.S