1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-22 20:41:26 +00:00

Make the inline ASM gcc 2.95 clean.

This commit is contained in:
David E. O'Brien 2000-01-09 20:37:05 +00:00
parent 8f7b024a6c
commit b27ac2c9dd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24610

View File

@ -0,0 +1,19 @@
--- lib/pgp/random/pgpRndPool.c.orig Sat Aug 9 14:45:13 1997
+++ lib/pgp/random/pgpRndPool.c Sun Jan 9 12:23:07 2000
@@ -292,13 +292,14 @@
* safely underestimated if desired, if a 64-bit product is difficult to
* compute.
*
-* The simplest snd safest definition is
+* The simplest and safest definition is
* #define UMULH_32(r,a,b) (r) = 0
*/
#ifndef UMULH_32
#if defined(__GNUC__) && defined(__i386__)
/* Inline asm goodies */
-#define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r) : "%a"(a), "mr"(b) : "ax")
+/* WAS: #define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r) : "%a"(a), "mr"(b) : "ax") */
+#define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r), "=a"(a)/*unused, but needed due to new clobberlist restrictions*/ : "%1"(a), "mr"(b))
#elif HAVE64
#define UMULH_32(r,a,b) ((r) = (word32)((word64)(a) * (b) >> 32))
#else