openssl/openssl-0.9.7-beta6-ia64.patch

19 lines
692 B
Diff
Raw Permalink Normal View History

2012-02-01 14:54:40 +04:00
--- crypto/bn/bn_lcl.h 2008-12-16 19:02:02.000000000 +0100
+++ crypto/bn/bn_lcl.h.oden 2008-12-16 19:02:17.000000000 +0100
@@ -288,6 +288,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 */