2002-07-06 23:07:30 +08:00
|
|
|
/* Compute positive difference.
|
2014-01-01 19:03:15 +08:00
|
|
|
Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
2002-07-06 23:07:30 +08:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-10 07:18:22 +08:00
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
2002-07-06 23:07:30 +08:00
|
|
|
|
|
|
|
#include <sysdep.h>
|
|
|
|
|
|
|
|
.text
|
|
|
|
ENTRY(__fdiml)
|
2002-07-08 15:42:03 +08:00
|
|
|
fldt 8(%rsp) // x
|
|
|
|
fldt 24(%rsp) // x : y
|
2002-07-06 23:07:30 +08:00
|
|
|
|
|
|
|
fucomi %st(1), %st
|
|
|
|
jp 1f
|
|
|
|
|
2004-09-26 18:11:59 +08:00
|
|
|
jc 3f
|
|
|
|
fstp %st(1)
|
2002-07-06 23:07:30 +08:00
|
|
|
fldz
|
|
|
|
jmp 2f
|
|
|
|
|
2004-09-26 18:11:59 +08:00
|
|
|
3: fsubrp %st, %st(1)
|
|
|
|
ret
|
|
|
|
|
2002-07-06 23:07:30 +08:00
|
|
|
1: fucomi %st(0), %st
|
|
|
|
fcmovnu %st(1), %st
|
|
|
|
2: fstp %st(1)
|
|
|
|
ret
|
|
|
|
END(__fdiml)
|
|
|
|
weak_alias (__fdiml, fdiml)
|