Sync usage with man page.
[netbsd-mini2440.git] / lib / libc / arch / x86_64 / stdlib / labs.S
blobe0f0d925d0efaab9c1d82948627dcbcd337abba3
1 /*      $NetBSD: labs.S,v 1.1 2001/06/19 00:25:04 fvdl Exp $    */
3 /*
4  * Written by Frank van der Linden (fvdl@wasabisystems.com)
5  * Public Domain.
6  */
8 #include <machine/asm.h>
10 #if defined(LIBC_SCCS)
11         RCSID("$NetBSD: labs.S,v 1.1 2001/06/19 00:25:04 fvdl Exp $")
12 #endif
14 #ifdef WEAK_ALIAS
15 WEAK_ALIAS(imaxabs, _llabs)
16 WEAK_ALIAS(llabs, _llabs)
17 WEAK_ALIAS(labs, _labs)
18 #endif
20 #ifdef WEAK_ALIAS
21 ENTRY(_llabs)
22 ENTRY(_labs)
23 #else
24 ENTRY(llabs)
25 ENTRY(labs)
26 #endif
27         movq    %rdi,%rax
28         testq   %rax,%rax
29         jns     1f
30         negq    %rax
31 1:      ret