openssl/openssl-0.9.8g-ia64.patch
2008-08-10 20:36:12 +00:00

20 lines
804 B
Diff

diff -up openssl-0.9.8g/crypto/bn/bn_lcl.h.ia64 openssl-0.9.8g/crypto/bn/bn_lcl.h
--- openssl-0.9.8g/crypto/bn/bn_lcl.h.ia64 2008-08-10 22:23:55.000000000 +0200
+++ openssl-0.9.8g/crypto/bn/bn_lcl.h 2008-08-10 22:23:55.000000000 +0200
@@ -279,6 +279,15 @@ extern "C" {
# define BN_UMULT_HIGH(a,b) __umulh((a),(b))
# define BN_UMULT_LOHI(low,high,a,b) ((low)=_umul128((a),(b),&(high)))
# endif
+# elif defined(__ia64) && defined(SIXTY_FOUR_BIT_LONG)
+# if defined(__GNUC__)
+# define BN_UMULT_HIGH(a,b) ({ \
+ register BN_ULONG ret; \
+ asm ("xmpy.hu %0 = %1, %2" \
+ : "=f"(ret) \
+ : "f"(a), "f"(b)); \
+ ret; })
+# endif /* compiler */
# endif /* cpu */
#endif /* OPENSSL_NO_ASM */