Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / src / untrusted / stubs / crtn_x86_64.S
1 /*
2  * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6     /*
7      * nacl-clang does not use the .init/.fini mechanism at all.
8      */
9 #if !defined(__clang__)
10     /*
11      * The .init section needs to be finished by a function return.
12      */
13     .section .init
14     .p2align NACLENTRYALIGN,0x90
15
16     movq %rbp, %rsp
17     popq %r11
18     movl %r11d,%ebp
19     addq %r15,%rbp
20     naclret
21
22     .p2align NACLENTRYALIGN,0xf4
23
24     /*
25      * The .fini section needs to be finished by a function return.
26      */
27     .section .fini
28     .p2align NACLENTRYALIGN,0x90
29
30     movq %rbp, %rsp
31     popq %r11
32     movl %r11d,%ebp
33     addq %r15,%rbp
34     naclret
35 #endif
36     .p2align NACLENTRYALIGN,0xf4