Remove building with NOCRYPTO option
[minix.git] / sys / external / bsd / compiler_rt / dist / lib / builtins / x86_64 / floatundisf.S
blobe41f118140ab2a315304ec076e94eef722fbc203
1 // This file is dual licensed under the MIT and the University of Illinois Open
2 // Source Licenses. See LICENSE.TXT for details.
4 #include "../assembly.h"
6 // float __floatundisf(du_int a);
8 #ifdef __x86_64__
10 #if defined(__APPLE__)
11         .literal4
12 #elif defined(__ELF__)
13         .section .rodata
14 #else
15         .section .rdata,"rd"
16 #endif
18         .balign 16
19 two:
20         .single 2.0
22 #define REL_ADDR(_a)    (_a)(%rip)
24 .text
25 .balign 4
26 DEFINE_COMPILERRT_FUNCTION(__floatundisf)
27         movq            $1,                     %rsi
28         testq           %rdi,           %rdi
29         js                      1f
30         cvtsi2ssq       %rdi,           %xmm0
31         ret
32         
33 1:      andq            %rdi,           %rsi
34         shrq            %rdi
35         orq                     %rsi,           %rdi
36         cvtsi2ssq       %rdi,           %xmm0
37         mulss   REL_ADDR(two),  %xmm0
38         ret
39 END_COMPILERRT_FUNCTION(__floatundisf)
41 #endif // __x86_64__