mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
mips fixes
This commit is contained in:
parent
397f9cd6a1
commit
f7ab9d61bf
@ -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
|
||||||
|
@ -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); \
|
||||||
@ -727,8 +727,8 @@ extern USItype __udiv_qrnnd ();
|
|||||||
#else
|
#else
|
||||||
#define umul_ppmm(w1, w0, u, v) \
|
#define umul_ppmm(w1, w0, u, v) \
|
||||||
__asm__ ("multu %2,%3 \n" \
|
__asm__ ("multu %2,%3 \n" \
|
||||||
"mflo %0 \n" \
|
"mflo %0 \n" \
|
||||||
"mfhi %1" \
|
"mfhi %1" \
|
||||||
: "=d" ((USItype)(w0)), \
|
: "=d" ((USItype)(w0)), \
|
||||||
"=d" ((USItype)(w1)) \
|
"=d" ((USItype)(w1)) \
|
||||||
: "d" ((USItype)(u)), \
|
: "d" ((USItype)(u)), \
|
||||||
@ -742,25 +742,33 @@ 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) \
|
# define umul_ppmm(w1, w0, u, v) \
|
||||||
__asm__ ("dmultu %2,%3" \
|
do { \
|
||||||
: "=l" ((UDItype)(w0)), \
|
typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
|
||||||
"=h" ((UDItype)(w1)) \
|
__ll_UTItype __ll = (__ll_UTItype)(u) * (v); \
|
||||||
: "d" ((UDItype)(u)), \
|
w1 = __ll >> 64; \
|
||||||
"d" ((UDItype)(v)))
|
w0 = __ll; \
|
||||||
#else
|
} while (0)
|
||||||
#define umul_ppmm(w1, w0, u, v) \
|
# elif if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
|
||||||
__asm__ ("dmultu %2,%3 \n" \
|
# define umul_ppmm(w1, w0, u, v) \
|
||||||
"mflo %0 \n" \
|
__asm__ ("dmultu %2,%3" \
|
||||||
"mfhi %1" \
|
: "=l" ((UDItype)(w0)), \
|
||||||
: "=d" ((UDItype)(w0)), \
|
"=h" ((UDItype)(w1)) \
|
||||||
"=d" ((UDItype)(w1)) \
|
: "d" ((UDItype)(u)), \
|
||||||
: "d" ((UDItype)(u)), \
|
"d" ((UDItype)(v)))
|
||||||
"d" ((UDItype)(v)))
|
# else
|
||||||
#endif
|
# define umul_ppmm(w1, w0, u, v) \
|
||||||
#define UMUL_TIME 20
|
__asm__ ("dmultu %2,%3 \n" \
|
||||||
#define UDIV_TIME 140
|
"mflo %0 \n" \
|
||||||
|
"mfhi %1" \
|
||||||
|
: "=d" ((UDItype)(w0)), \
|
||||||
|
"=d" ((UDItype)(w1)) \
|
||||||
|
: "d" ((UDItype)(u)), \
|
||||||
|
"d" ((UDItype)(v)))
|
||||||
|
# endif
|
||||||
|
# define UMUL_TIME 20
|
||||||
|
# define UDIV_TIME 140
|
||||||
#endif /* __mips__ */
|
#endif /* __mips__ */
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user