Debian Codegraph @

mingw-w64-crt/math/x86/copysignl.S

raw
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6 /*
7 * Written by J.T. Conklin <[email protected]>.
8 * Changes for long double by Ulrich Drepper <[email protected]>
9 * Public domain.
10 */
11 #include <_mingw_mac.h>
12
13 .file "copysignl.S"
14 .text
15 #ifdef __x86_64__
16 .align 8
17 #else
18 .align 4
19 #endif
20
21 .globl __MINGW_USYMBOL(copysignl)
22 .def __MINGW_USYMBOL(copysignl); .scl 2; .type 32; .endef
23 __MINGW_USYMBOL(copysignl):
24 #if defined(_AMD64_) || defined(__x86_64__)
25 movq (%rdx), %rax
26 movq %rax, (%rcx)
27 movq 8(%rdx), %rax
28 movq 8(%r8), %rdx
29 andq $0x7fff, %rax
30 andq $0x8000, %rdx
31 orq %rdx, %rax
32 movq %rax, 8(%rcx)
33 movq %rcx, %rax
34 ret
35 #elif defined(_X86_) || defined(__i386__)
36 movl 24(%esp),%edx
37 movl 12(%esp),%eax
38 andl $0x8000,%edx
39 andl $0x7fff,%eax
40 orl %edx,%eax
41 movl %eax,12(%esp)
42 fldt 4(%esp)
43 ret
44 #endif