clarify the purpose of this project
[nyanglibc.git] / time / gettimeofday.s
blob15c0d1cdebecd8faad198bb391cb17473fcf449f
1 .text
2 .p2align 4,,15
3 .globl __gettimeofday
4 .type __gettimeofday, @function
5 __gettimeofday:
6 pushq %rbp
7 pushq %rbx
8 movq %rdi, %rbp
9 movq %rsi, %rbx
10 subq $8, %rsp
11 testq %rsi, %rsi
12 jne .L14
13 .L2:
14 movq _dl_vdso_gettimeofday(%rip), %rax
15 testq %rax, %rax
16 je .L7
17 movq %rbx, %rsi
18 movq %rbp, %rdi
19 call *%rax
20 movslq %eax, %rdx
21 cmpq $-4096, %rdx
22 jbe .L1
23 cmpq $-38, %rdx
24 je .L7
25 .L4:
26 movq __libc_errno@gottpoff(%rip), %rax
27 negl %edx
28 movl %edx, %fs:(%rax)
29 movl $-1, %eax
30 .L6:
31 .L1:
32 addq $8, %rsp
33 popq %rbx
34 popq %rbp
35 ret
36 .p2align 4,,10
37 .p2align 3
38 .L7:
39 movq %rbx, %rsi
40 movq %rbp, %rdi
41 movl $96, %eax
42 #APP
43 # 53 "../sysdeps/unix/sysv/linux/gettimeofday.c" 1
44 syscall
46 # 0 "" 2
47 #NO_APP
48 cmpq $-4096, %rax
49 movq %rax, %rdx
50 ja .L4
51 jmp .L1
52 .p2align 4,,10
53 .p2align 3
54 .L14:
55 movb $0, (%rsi)
56 jmp .L2
57 .size __gettimeofday, .-__gettimeofday
58 .weak gettimeofday
59 .set gettimeofday,__gettimeofday