1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

mips fixes

This commit is contained in:
Werner Koch 2010-10-22 07:35:30 +00:00
parent 397f9cd6a1
commit f7ab9d61bf
2 changed files with 35 additions and 22 deletions

View File

@ -1,3 +1,8 @@
2010-10-22 Jason Woodward <jason.woodward@timesys.com> (wk)
* longlong.h (umul_ppmm) [mips32]: Fix typo.
(umul_ppmm) [mips64]: Don't use =h with gcc >= 4.4.
2010-06-01 Werner Koch <wk@g10code.com> 2010-06-01 Werner Koch <wk@g10code.com>
* longlong.h (umul_ppmm) <__mips__>: Add code for gcc 4.4. This * longlong.h (umul_ppmm) <__mips__>: Add code for gcc 4.4. This

View File

@ -710,7 +710,7 @@ extern USItype __udiv_qrnnd ();
************** MIPS ***************** ************** MIPS *****************
***************************************/ ***************************************/
#if defined (__mips__) && W_TYPE_SIZE == 32 #if defined (__mips__) && W_TYPE_SIZE == 32
#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR >= 4 ) #if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
#define umul_ppmm(w1, w0, u, v) \ #define umul_ppmm(w1, w0, u, v) \
do { \ do { \
UDItype __ll = (UDItype)(u) * (v); \ UDItype __ll = (UDItype)(u) * (v); \
@ -742,7 +742,15 @@ extern USItype __udiv_qrnnd ();
************** MIPS/64 ************** ************** MIPS/64 **************
***************************************/ ***************************************/
#if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 # if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
# define umul_ppmm(w1, w0, u, v) \
do { \
typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
__ll_UTItype __ll = (__ll_UTItype)(u) * (v); \
w1 = __ll >> 64; \
w0 = __ll; \
} while (0)
# elif if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
# define umul_ppmm(w1, w0, u, v) \ # define umul_ppmm(w1, w0, u, v) \
__asm__ ("dmultu %2,%3" \ __asm__ ("dmultu %2,%3" \
: "=l" ((UDItype)(w0)), \ : "=l" ((UDItype)(w0)), \