mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 06:20:06 +00:00
Update longlong.h from GCC.
This commit is contained in:
parent
db1ee0a836
commit
c3c8283c06
@ -1,3 +1,7 @@
|
||||
2012-08-16 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* stdlib/longlong.h: Update from GCC.
|
||||
|
||||
2012-08-16 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
* stdlib/gmp-impl.h (udiv_qrnnd_preinv): Use __attribute__ ((unused))
|
||||
|
@ -850,8 +850,6 @@ UDItype __umulsidi3 (USItype, USItype);
|
||||
FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good
|
||||
enough, since that hits ARM and m68k too. */
|
||||
#if (defined (_ARCH_PPC) /* AIX */ \
|
||||
|| defined (_ARCH_PWR) /* AIX */ \
|
||||
|| defined (_ARCH_COM) /* AIX */ \
|
||||
|| defined (__powerpc__) /* gcc */ \
|
||||
|| defined (__POWERPC__) /* BEOS */ \
|
||||
|| defined (__ppc__) /* Darwin */ \
|
||||
@ -862,37 +860,37 @@ UDItype __umulsidi3 (USItype, USItype);
|
||||
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
|
||||
do { \
|
||||
if (__builtin_constant_p (bh) && (bh) == 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
|
||||
__asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
|
||||
__asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
|
||||
else \
|
||||
__asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
|
||||
__asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
|
||||
: "=r" (sh), "=&r" (sl) \
|
||||
: "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
|
||||
} while (0)
|
||||
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
|
||||
do { \
|
||||
if (__builtin_constant_p (ah) && (ah) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
|
||||
else \
|
||||
__asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
|
||||
__asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
|
||||
: "=r" (sh), "=&r" (sl) \
|
||||
: "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
|
||||
} while (0)
|
||||
#define count_leading_zeros(count, x) \
|
||||
__asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x))
|
||||
__asm__ ("cntlzw %0,%1" : "=r" (count) : "r" (x))
|
||||
#define COUNT_LEADING_ZEROS_0 32
|
||||
#if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \
|
||||
|| defined (__ppc__) \
|
||||
@ -914,14 +912,6 @@ UDItype __umulsidi3 (USItype, USItype);
|
||||
} while (0)
|
||||
#define SMUL_TIME 14
|
||||
#define UDIV_TIME 120
|
||||
#elif defined (_ARCH_PWR)
|
||||
#define UMUL_TIME 8
|
||||
#define smul_ppmm(xh, xl, m0, m1) \
|
||||
__asm__ ("mul %0,%2,%3" : "=r" (xh), "=q" (xl) : "r" (m0), "r" (m1))
|
||||
#define SMUL_TIME 4
|
||||
#define sdiv_qrnnd(q, r, nh, nl, d) \
|
||||
__asm__ ("div %0,%2,%4" : "=r" (q), "=q" (r) : "r" (nh), "1" (nl), "r" (d))
|
||||
#define UDIV_TIME 100
|
||||
#endif
|
||||
#endif /* 32-bit POWER architecture variants. */
|
||||
|
||||
@ -931,32 +921,32 @@ UDItype __umulsidi3 (USItype, USItype);
|
||||
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
|
||||
do { \
|
||||
if (__builtin_constant_p (bh) && (bh) == 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
|
||||
__asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
|
||||
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
|
||||
__asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
|
||||
else \
|
||||
__asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
|
||||
__asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
|
||||
: "=r" (sh), "=&r" (sl) \
|
||||
: "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
|
||||
} while (0)
|
||||
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
|
||||
do { \
|
||||
if (__builtin_constant_p (ah) && (ah) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
|
||||
else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
|
||||
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
|
||||
__asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
|
||||
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
|
||||
else \
|
||||
__asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
|
||||
__asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
|
||||
: "=r" (sh), "=&r" (sl) \
|
||||
: "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user