clarify the purpose of this project
[nyanglibc.git] / stdlib / erand48_r.shared.s
blobb2ba7ed755bfa1f8282bfd55a11410c0535eff08
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __erand48_r
9 .hidden __erand48_r
10 .type __erand48_r, @function
11 __erand48_r:
12 pushq %rbp
13 pushq %rbx
14 movq %rdi, %rbp
15 movq %rdx, %rbx
16 subq $24, %rsp
17 call __drand48_iterate
18 testl %eax, %eax
19 js .L3
20 movzwl 2(%rbp), %edx
21 movzwl 4(%rbp), %ecx
22 movl %edx, %eax
23 sall $4, %ecx
24 sall $20, %edx
25 shrw $12, %ax
26 movzwl %ax, %eax
27 orl %eax, %ecx
28 movzwl 0(%rbp), %eax
29 salq $32, %rcx
30 sall $4, %eax
31 orl %edx, %eax
32 movabsq $4607182418800017408, %rdx
33 orq %rdx, %rcx
34 orq %rax, %rcx
35 xorl %eax, %eax
36 movq %rcx, 8(%rsp)
37 movsd 8(%rsp), %xmm0
38 subsd .LC0(%rip), %xmm0
39 movsd %xmm0, (%rbx)
40 .L1:
41 addq $24, %rsp
42 popq %rbx
43 popq %rbp
44 ret
45 .p2align 4,,10
46 .p2align 3
47 .L3:
48 movl $-1, %eax
49 jmp .L1
50 .size __erand48_r, .-__erand48_r
51 .weak erand48_r
52 .set erand48_r,__erand48_r
53 .section .rodata.cst8,"aM",@progbits,8
54 .align 8
55 .LC0:
56 .long 0
57 .long 1072693248
58 .hidden __drand48_iterate