1 //===-- orc_rt_macho_tlv.x86-64.s -------------------------------*- ASM -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file is a part of the ORC runtime support library.
11 //===----------------------------------------------------------------------===//
13 // The content of this file is x86_64-only
14 #if defined(__x86_64__)
16 #define REGISTER_SAVE_SPACE_SIZE 512
20 // returns address of TLV in %rax, all other registers preserved
21 .globl ___orc_rt_macho_tlv_get_addr
22 ___orc_rt_macho_tlv_get_addr:
25 subq $REGISTER_SAVE_SPACE_SIZE, %rsp
39 movdqa %xmm0, -128(%rbp)
40 movdqa %xmm1, -144(%rbp)
41 movdqa %xmm2, -160(%rbp)
42 movdqa %xmm3, -176(%rbp)
43 movdqa %xmm4, -192(%rbp)
44 movdqa %xmm5, -208(%rbp)
45 movdqa %xmm6, -224(%rbp)
46 movdqa %xmm7, -240(%rbp)
47 call ___orc_rt_macho_tlv_get_addr_impl
61 movdqa -128(%rbp), %xmm0
62 movdqa -144(%rbp), %xmm1
63 movdqa -160(%rbp), %xmm2
64 movdqa -176(%rbp), %xmm3
65 movdqa -192(%rbp), %xmm4
66 movdqa -208(%rbp), %xmm5
67 movdqa -224(%rbp), %xmm6
68 movdqa -240(%rbp), %xmm7
69 addq $REGISTER_SAVE_SPACE_SIZE, %rsp
73 #endif // defined(__x86_64__)