summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sparc/soft-fp/q_fge.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2010-11-28 21:09:47 +0100
committerCarmelo Amoroso <carmelo.amoroso@st.com>2010-11-28 21:09:47 +0100
commit57f6cce72c889f2e7b342e87a565a064320a6ee2 (patch)
tree5466406472918d3adb63398f5fb9ea1511a5e73f /libc/sysdeps/linux/sparc/soft-fp/q_fge.c
parent4ec89b87bc0eea8d9ca6b50564d12eeb3b1b0119 (diff)
parent5dea871ac73ef4608022c058b50adc946917f9b9 (diff)
Merge commit 'origin/master' into prelink
Conflicts: ldso/include/dl-hash.h Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/sysdeps/linux/sparc/soft-fp/q_fge.c')
-rw-r--r--libc/sysdeps/linux/sparc/soft-fp/q_fge.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/sparc/soft-fp/q_fge.c b/libc/sysdeps/linux/sparc/soft-fp/q_fge.c
new file mode 100644
index 000000000..db1fdbe82
--- /dev/null
+++ b/libc/sysdeps/linux/sparc/soft-fp/q_fge.c
@@ -0,0 +1,40 @@
+/* Software floating-point emulation.
+ Return 1 if a >= b
+ Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ 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
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+int _Q_fge(const long double a, const long double b)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B);
+ int r;
+
+ FP_UNPACK_RAW_Q(A, a);
+ FP_UNPACK_RAW_Q(B, b);
+ FP_CMP_Q(r, B, A, 3);
+ if (r == 3)
+ FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_HANDLE_EXCEPTIONS;
+
+ return (r <= 0);
+}