clarify the purpose of this project
[nyanglibc.git] / time / ftime.shared.s
blobaf9b620dc8ed0266c6b89cb780e20711e30efed2
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 ftime
9 .type ftime, @function
10 ftime:
11 pushq %rbx
12 movq %rdi, %rbx
13 xorl %edi, %edi
14 subq $16, %rsp
15 movq %rsp, %rsi
16 call __GI___clock_gettime
17 movq (%rsp), %rax
18 movq 8(%rsp), %rcx
19 movabsq $4835703278458516699, %rdx
20 movl $0, 10(%rbx)
21 movq %rax, (%rbx)
22 movq %rcx, %rax
23 sarq $63, %rcx
24 imulq %rdx
25 xorl %eax, %eax
26 sarq $18, %rdx
27 subq %rcx, %rdx
28 movw %dx, 8(%rbx)
29 addq $16, %rsp
30 popq %rbx
31 ret
32 .size ftime, .-ftime