clarify the purpose of this project
[nyanglibc.git] / time / time.s
blob865dba6d02a7caf6349517bc98f2ca67b49da1f4
1 .text
2 .p2align 4,,15
3 .globl time
4 .type time, @function
5 time:
6 movq _dl_vdso_time(%rip), %rax
7 pushq %rbx
8 movq %rdi, %rbx
9 testq %rax, %rax
10 je .L5
11 call *%rax
12 cmpq $-4096, %rax
13 jbe .L1
14 cmpq $-38, %rax
15 jne .L3
16 .L5:
17 movq %rbx, %rdi
18 movl $201, %eax
19 #APP
20 # 46 "../sysdeps/unix/sysv/linux/time.c" 1
21 syscall
23 # 0 "" 2
24 #NO_APP
25 cmpq $-4096, %rax
26 ja .L3
27 .L1:
28 popq %rbx
29 ret
30 .p2align 4,,10
31 .p2align 3
32 .L3:
33 .L4:
34 movq __libc_errno@gottpoff(%rip), %rdx
35 negl %eax
36 movl %eax, %fs:(%rdx)
37 movq $-1, %rax
38 popq %rbx
39 ret
40 .size time, .-time