From cf00cc00bc53ab26b23b810b4bfbdfb43262538a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Aug 2009 18:05:48 -0700 Subject: Add ceil implementation for 64-bit machines. On 64-bit machines we should not split doubles into two 32 bit integer and handle the words separately. We have wide registers. This patch implements a 64-bit ceil version. Ideally all other functions will be converted over time. --- sysdeps/x86_64/fpu/math_private.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sysdeps/x86_64/fpu/math_private.h') diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h index 8f4b792..4be7536 100644 --- a/sysdeps/x86_64/fpu/math_private.h +++ b/sysdeps/x86_64/fpu/math_private.h @@ -22,6 +22,23 @@ while (0) /* We can do a few things better on x86-64. */ /* Direct movement of float into integer register. */ +#undef EXTRACT_WORDS64 +#define EXTRACT_WORDS64(i,d) \ +do { \ + long int i_; \ + asm ("movd %1, %0" : "=rm" (i_) : "x" (d)); \ + (i) = i_; \ +} while (0) + +/* And the reverse. */ +#undef INSERT_WORDS64 +#define INSERT_WORDS64(d,i) \ +do { \ + long int i_ = i; \ + asm ("movd %1, %0" : "=x" (d) : "rm" (i_)); \ +} while (0) + +/* Direct movement of float into integer register. */ #undef GET_FLOAT_WORD #define GET_FLOAT_WORD(i,d) \ do { \ -- cgit v1.1