aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2014-05-14 17:23:22 +0000
committerDJ Delorie <dj@redhat.com>2014-05-14 17:23:22 +0000
commit86d2e3d0e7c0546a9d80b9f9c112dd04b7918758 (patch)
tree100d3dfd1dfca8a70aef0a6c7f81921688f5f868 /include
parenta265e7269fb3a78107a810b3df61819ecb8cd825 (diff)
downloadnewlib-86d2e3d0e7c0546a9d80b9f9c112dd04b7918758.zip
newlib-86d2e3d0e7c0546a9d80b9f9c112dd04b7918758.tar.gz
newlib-86d2e3d0e7c0546a9d80b9f9c112dd04b7918758.tar.bz2
merge from gcc
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog12
-rw-r--r--include/longlong.h22
2 files changed, 31 insertions, 3 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index f8ddfb2..329bf12 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,15 @@
+2014-05-01 Steve Ellcey <sellcey@mips.com>
+
+ * include/longlong.h: Use 'defined()' to check __mips16.
+
+2014-04-30 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * longlong.h (__i386__): Remove W_TYPE_SIZE==64 handling.
+
+2014-04-22 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * longlong.h: Merge from glibc.
+
2014-01-21 Tom Tromey <tromey@redhat.com>
* ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS)
diff --git a/include/longlong.h b/include/longlong.h
index 5f00e54..31f88cb 100644
--- a/include/longlong.h
+++ b/include/longlong.h
@@ -1,5 +1,5 @@
/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
- Copyright (C) 1991-2013 Free Software Foundation, Inc.
+ Copyright (C) 1991-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -122,6 +122,22 @@ extern const UQItype __clz_tab[256] attribute_hidden;
#define __AND_CLOBBER_CC , "cc"
#endif /* __GNUC__ < 2 */
+#if defined (__aarch64__)
+
+#if W_TYPE_SIZE == 32
+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X))
+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif /* W_TYPE_SIZE == 32 */
+
+#if W_TYPE_SIZE == 64
+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clzll (X))
+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctzll (X))
+#define COUNT_LEADING_ZEROS_0 64
+#endif /* W_TYPE_SIZE == 64 */
+
+#endif /* __aarch64__ */
+
#if defined (__alpha) && W_TYPE_SIZE == 64
#define umul_ppmm(ph, pl, m0, m1) \
do { \
@@ -467,7 +483,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
#define UDIV_TIME 40
#endif /* 80x86 */
-#if (defined (__x86_64__) || defined (__i386__)) && W_TYPE_SIZE == 64
+#if defined (__x86_64__) && W_TYPE_SIZE == 64
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("add{q} {%5,%1|%1,%5}\n\tadc{q} {%3,%0|%0,%3}" \
: "=r" ((UDItype) (sh)), \
@@ -832,7 +848,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
#define UMUL_TIME 10
#define UDIV_TIME 100
-#if (__mips == 32 || __mips == 64) && ! __mips16
+#if (__mips == 32 || __mips == 64) && ! defined (__mips16)
#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
#define COUNT_LEADING_ZEROS_0 32
#endif