summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-09-02 11:49:06 +0200
committerAndreas Schwab <schwab@redhat.com>2009-09-02 11:49:06 +0200
commit91740ee0e6897651f4996c52b6056af592f4e977 (patch)
treea517ca4dfac93d24c0c3e1ec897085ca28e4315a /sysdeps
parentb19ed4af95f005441cee8d138951665164bd28a8 (diff)
parentd840539e1271020600edba752e6ee908c00f66eb (diff)
Merge commit 'origin/master' into fedora/master
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/powerpc/powerpc32/power6/memcpy.S2
-rw-r--r--sysdeps/x86_64/fpu/bits/mathinline.h12
2 files changed, 13 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S
index 156b0bd8cc..cafe9174fd 100644
--- a/sysdeps/powerpc/powerpc32/power6/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/power6/memcpy.S
@@ -220,7 +220,7 @@ L(word_unaligned_short):
subf 10,0,5
add 12,4,0
blt cr6,5f
- srdi 7,6,16
+ srwi 7,6,16
bgt cr6,3f
sth 6,0(3)
b 7f
diff --git a/sysdeps/x86_64/fpu/bits/mathinline.h b/sysdeps/x86_64/fpu/bits/mathinline.h
index ece0f02678..dc58f67d6c 100644
--- a/sysdeps/x86_64/fpu/bits/mathinline.h
+++ b/sysdeps/x86_64/fpu/bits/mathinline.h
@@ -22,6 +22,8 @@
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
#endif
+#include <bits/wordsize.h>
+
#ifndef __extern_inline
# define __MATH_INLINE __inline
#else
@@ -35,16 +37,26 @@
__MATH_INLINE int
__NTH (__signbitf (float __x))
{
+#if __WORDSIZE == 32
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+#else
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x8;
+#endif
}
__MATH_INLINE int
__NTH (__signbit (double __x))
{
+#if __WORDSIZE == 32
+ __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
+ return __u.__i[1] < 0;
+#else
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x80;
+#endif
}
__MATH_INLINE int
__NTH (__signbitl (long double __x))