2 //===-- orc_rt_elfnix_tls_x86-64.s -------------------------------*- ASM -*-===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 // This file is a part of the ORC runtime support library.
12 //===----------------------------------------------------------------------===//
14 // The content of this file is x86_64-only
15 #if defined(__x86_64__)
17 #define REGISTER_SAVE_SPACE_SIZE 512
21 // returns address of TLV in %rax, all other registers preserved
22 .globl ___orc_rt_elfnix_tls_get_addr
23 ___orc_rt_elfnix_tls_get_addr:
26 subq $REGISTER_SAVE_SPACE_SIZE, %rsp
35 movdqa %xmm0, -128(%rbp)
36 movdqa %xmm1, -144(%rbp)
37 movdqa %xmm2, -160(%rbp)
38 movdqa %xmm3, -176(%rbp)
39 movdqa %xmm4, -192(%rbp)
40 movdqa %xmm5, -208(%rbp)
41 movdqa %xmm6, -224(%rbp)
42 movdqa %xmm7, -240(%rbp)
43 call __orc_rt_elfnix_tls_get_addr_impl
52 movdqa -128(%rbp), %xmm0
53 movdqa -144(%rbp), %xmm1
54 movdqa -160(%rbp), %xmm2
55 movdqa -176(%rbp), %xmm3
56 movdqa -192(%rbp), %xmm4
57 movdqa -208(%rbp), %xmm5
58 movdqa -224(%rbp), %xmm6
59 movdqa -240(%rbp), %xmm7
60 addq $REGISTER_SAVE_SPACE_SIZE, %rsp
64 #endif // defined(__x86_64__)